Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2025-05-21 12:27:51 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e7853572baaefe348433d39a29911d1b5f18f1f2
e7853572
1 parent
fae15075
db fixes
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
0 deletions
warply_android_sdk/src/main/AndroidManifest.xml
warply_android_sdk/src/main/java/ly/warp/sdk/db/WarplyDBHelper.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyProvider.java
warply_android_sdk/src/main/AndroidManifest.xml
View file @
e785357
...
...
@@ -47,5 +47,9 @@
<receiver
android:name=
".receivers.LocationChangedReceiver"
android:exported=
"false"
/>
<provider
android:name=
".utils.WarplyProvider"
android:authorities=
"ly.warp.sdk.utils.WarplyProvider"
/>
</application>
</manifest>
\ No newline at end of file
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/db/WarplyDBHelper.java
View file @
e785357
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyProvider.java
0 → 100644
View file @
e785357
package
ly
.
warp
.
sdk
.
utils
;
import
android.content.ContentProvider
;
import
android.content.ContentValues
;
import
android.content.Context
;
import
android.database.Cursor
;
import
android.net.Uri
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.appcompat.app.AppCompatDelegate
;
import
ly.warp.sdk.db.WarplyDBHelper
;
/**
* Created by Panagiotis Triantafyllou on 05/Αυγ/2022.
*/
public
class
WarplyProvider
extends
ContentProvider
{
@Override
public
boolean
onCreate
()
{
// AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
// Initialize the database helper
Context
context
=
getContext
();
if
(
context
!=
null
)
{
WarplyDBHelper
dbHelper
=
WarplyDBHelper
.
getInstance
(
context
);
dbHelper
.
initialize
();
// This will initialize the database connection on a background thread
}
// ViewPump.init(ViewPump.builder()
// .addInterceptor(new CalligraphyInterceptor(
// new CalligraphyConfig.Builder()
// .setDefaultFontPath("fonts/pf_square_sans_pro_regular.ttf")
// .setFontAttrId(R.attr.fontPath)
//// .setFontMapper(new FontMapper() {
//// @Override
//// public String map(String font) {
//// return font;
//// }
//// })
// .build()))
// .build());
return
true
;
}
@Override
public
void
shutdown
()
{
// Get the database helper instance and shut it down
Context
context
=
getContext
();
if
(
context
!=
null
)
{
WarplyDBHelper
dbHelper
=
WarplyDBHelper
.
getInstance
(
context
);
dbHelper
.
shutdown
();
}
super
.
shutdown
();
}
@Nullable
@Override
public
Cursor
query
(
@NonNull
Uri
uri
,
@Nullable
String
[]
strings
,
@Nullable
String
s
,
@Nullable
String
[]
strings1
,
@Nullable
String
s1
)
{
return
null
;
}
@Nullable
@Override
public
String
getType
(
@NonNull
Uri
uri
)
{
return
null
;
}
@Nullable
@Override
public
Uri
insert
(
@NonNull
Uri
uri
,
@Nullable
ContentValues
contentValues
)
{
return
null
;
}
@Override
public
int
delete
(
@NonNull
Uri
uri
,
@Nullable
String
s
,
@Nullable
String
[]
strings
)
{
return
0
;
}
@Override
public
int
update
(
@NonNull
Uri
uri
,
@Nullable
ContentValues
contentValues
,
@Nullable
String
s
,
@Nullable
String
[]
strings
)
{
return
0
;
}
}
Please
register
or
login
to post a comment