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
2024-07-11 17:57:37 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
935db8e6cb5ed3f4cc69e314577aa0827a454dae
935db8e6
1 parent
07457c21
fixes in health service
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
warply_android_sdk/src/main/AndroidManifest.xml
warply_android_sdk/src/main/java/ly/warp/sdk/receivers/RestartHealthServiceReceiver.java
warply_android_sdk/src/main/AndroidManifest.xml
View file @
935db8e
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/java/ly/warp/sdk/receivers/RestartHealthServiceReceiver.java
0 → 100644
View file @
935db8e
package
ly
.
warp
.
sdk
.
receivers
;
import
android.content.BroadcastReceiver
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Build
;
import
ly.warp.sdk.services.WarplyHealthService
;
public
class
RestartHealthServiceReceiver
extends
BroadcastReceiver
{
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
if
(
Intent
.
ACTION_BOOT_COMPLETED
.
equals
(
intent
.
getAction
())
||
Intent
.
ACTION_MY_PACKAGE_REPLACED
.
equals
(
intent
.
getAction
()))
{
Intent
stepsRestartServiceIntent
=
new
Intent
(
context
,
WarplyHealthService
.
class
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
context
.
startForegroundService
(
stepsRestartServiceIntent
);
}
else
{
context
.
startService
(
stepsRestartServiceIntent
);
}
}
}
}
\ No newline at end of file
Please
register
or
login
to post a comment