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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
39 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
...
...
@@ -16,7 +16,8 @@
<uses-permission
android:name=
"android.permission.CHANGE_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE_HEALTH"
/>
<uses-permission
android:name=
"android.permission.HIGH_SAMPLING_RATE_SENSORS"
/>
<uses-permission
android:name=
"android.permission.POST_NOTIFICATIONS"
/>
<uses-permission
android:name=
"android.permission.POST_NOTIFICATIONS"
/>
<uses-permission
android:name=
"android.permission.RECEIVE_BOOT_COMPLETED"
/>
<application
android:largeHeap=
"true"
>
<!-- <meta-data-->
...
...
@@ -33,49 +34,49 @@
android:value=
"false"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.WarpViewActivity"
android:name=
".activities.WarpViewActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.LoyaltyAnalysisActivity"
android:name=
".activities.LoyaltyAnalysisActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.LoyaltyHistoryActivity"
android:name=
".activities.LoyaltyHistoryActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.CouponInfoActivity"
android:name=
".activities.CouponInfoActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.LoyaltyMarketAnalysisActivity"
android:name=
".activities.LoyaltyMarketAnalysisActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.UnifiedCouponInfoActivity"
android:name=
".activities.UnifiedCouponInfoActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.ActiveCouponsActivity"
android:name=
".activities.ActiveCouponsActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.ActiveUnifiedCouponsActivity"
android:name=
".activities.ActiveUnifiedCouponsActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
...
...
@@ -100,62 +101,62 @@
<!-- android:theme="@style/SDKAppTheme" />-->
<activity
android:name=
"
ly.warp.sdk
.activities.GiftsForYouActivity"
android:name=
".activities.GiftsForYouActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/GFYAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.MoreForYouActivity"
android:name=
".activities.MoreForYouActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.CouponsetInfoActivity"
android:name=
".activities.CouponsetInfoActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.ShopsActivity"
android:name=
".activities.ShopsActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.ShopsHuaweiActivity"
android:name=
".activities.ShopsHuaweiActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.CouponShareActivity"
android:name=
".activities.CouponShareActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.TelcoActivity"
android:name=
".activities.TelcoActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.ContextualActivity"
android:name=
".activities.ContextualActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
android:theme=
"@style/SDKAppTheme"
/>
<activity
android:name=
"
ly.warp.sdk
.dexter.PermissionsActivity"
android:name=
".dexter.PermissionsActivity"
android:exported=
"false"
android:launchMode=
"singleInstance"
android:screenOrientation=
"portrait"
android:theme=
"@android:style/Theme.Light.NoTitleBar"
/>
<activity
android:name=
"
ly.warp.sdk
.activities.BaseFragmentActivity"
android:name=
".activities.BaseFragmentActivity"
android:exported=
"true"
android:screenOrientation=
"portrait"
>
<intent-filter
android:autoVerify=
"true"
>
...
...
@@ -177,70 +178,70 @@
<!-- Service used for updating user's location. -->
<service
android:name=
"
ly.warp.sdk
.services.UpdateUserLocationService"
android:name=
".services.UpdateUserLocationService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.EventService"
android:name=
".services.EventService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.VouchersFetchedService"
android:name=
".services.VouchersFetchedService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.EventCouponsService"
android:name=
".services.EventCouponsService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.EventRewardsCouponsService"
android:name=
".services.EventRewardsCouponsService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.EventUnifiedCouponsService"
android:name=
".services.EventUnifiedCouponsService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.EventCampaignCouponService"
android:name=
".services.EventCampaignCouponService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.EventCampaignService"
android:name=
".services.EventCampaignService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.EventRefreshDeviceTokenService"
android:name=
".services.EventRefreshDeviceTokenService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.EventQuestionnaireService"
android:name=
".services.EventQuestionnaireService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<!-- android:stopWithTask="false"-->
<!-- android:process=":warplyHealthService"-->
<service
android:name=
"
ly.warp.sdk
.services.WarplyHealthService"
android:name=
".services.WarplyHealthService"
android:exported=
"false"
android:foregroundServiceType=
"health"
android:permission=
"android.permission.
BIND_JOB
_SERVICE"
/>
android:permission=
"android.permission.
FOREGROUND
_SERVICE"
/>
<service
android:name=
"
ly.warp.sdk
.services.WarplyBeaconsRangingService"
android:name=
".services.WarplyBeaconsRangingService"
android:exported=
"false"
/>
<!-- Service used for in app notification. -->
<service
android:name=
"
ly.warp.sdk
.services.WarpInAppNotificationService"
android:name=
".services.WarpInAppNotificationService"
android:exported=
"false"
/>
<!-- FCM Service for push notifications -->
...
...
@@ -262,7 +263,7 @@
<!-- </service>-->
<receiver
android:name=
"
ly.warp.sdk
.receivers.LocationChangedReceiver"
android:name=
".receivers.LocationChangedReceiver"
android:exported=
"false"
/>
<!-- <receiver-->
...
...
@@ -275,7 +276,7 @@
<!-- </receiver>-->
<receiver
android:name=
"
ly.warp.sdk
.receivers.BluetoothStateChangeReceiver"
android:name=
".receivers.BluetoothStateChangeReceiver"
android:exported=
"false"
>
<intent-filter>
<action
android:name=
"android.bluetooth.adapter.action.STATE_CHANGED"
/>
...
...
@@ -283,11 +284,20 @@
</receiver>
<receiver
android:name=
"
ly.warp.sdk
.receivers.WarplyInAppNotificationReceiver"
android:name=
".receivers.WarplyInAppNotificationReceiver"
android:exported=
"false"
/>
<!-- <provider-->
<!-- android:name=".utils.WarplyProvider"-->
<!-- android:authorities="ly.warp.sdk.utils.WarplyProvider" />-->
<receiver
android:name=
".receivers.RestartHealthServiceReceiver"
android:exported=
"false"
>
<intent-filter>
<action
android:name=
"android.intent.action.BOOT_COMPLETED"
/>
<action
android:name=
"android.intent.action.MY_PACKAGE_REPLACED"
/>
</intent-filter>
</receiver>
<!-- <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/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