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-26 16:47:52 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ee6ee87ae66b23d38e42f2bd4e34bce97c13cacb
ee6ee87a
1 parent
6cfe1dbb
REMOVE STEPS
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
32 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/AndroidManifest.xml
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
warply_android_sdk/build.gradle
View file @
ee6ee87
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.5.4r3
2
'
PUBLISH_VERSION
=
'4.5.5.4r3
3
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/AndroidManifest.xml
View file @
ee6ee87
...
...
@@ -14,8 +14,8 @@
tools:node=
"remove"
/>
<uses-permission
android:name=
"com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA"
/>
<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.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.ACTIVITY_RECOGNITION" />-->
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />-->
...
...
@@ -230,11 +230,11 @@
<!-- android:stopWithTask="false"-->
<!-- android:process=":warplyHealthService"-->
<service
android:name=
".services.WarplyHealthService"
android:exported=
"false"
android:foregroundServiceType=
"health"
android:permission=
"android.permission.FOREGROUND_SERVICE"
/
>
<!-- <service-->
<!-- android:name=".services.WarplyHealthService"-->
<!-- android:exported="false"-->
<!-- android:foregroundServiceType="health"-->
<!-- android:permission="android.permission.FOREGROUND_SERVICE" />--
>
<service
android:name=
".services.WarplyBeaconsRangingService"
...
...
@@ -288,14 +288,14 @@
android:name=
".receivers.WarplyInAppNotificationReceiver"
android:exported=
"false"
/>
<receiver
android:name=
".receivers.RestartHealthServiceReceiver"
android:exported=
"false"
>
<intent-filter
>
<!--
<action android:name="android.intent.action.BOOT_COMPLETED" />
-->
<action
android:name=
"android.intent.action.RESTART"
/
>
</intent-filter
>
</receiver
>
<!-- <receiver-->
<!-- android:name=".receivers.RestartHealthServiceReceiver"-->
<!-- android:exported="false">--
>
<!-- <intent-filter>--
>
<!--
<!– <action android:name="android.intent.action.BOOT_COMPLETED" />–>
-->
<!-- <action android:name="android.intent.action.RESTART" />--
>
<!-- </intent-filter>--
>
<!-- </receiver>--
>
<!-- <provider-->
<!-- android:name=".utils.WarplyProvider"-->
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
ee6ee87
...
...
@@ -1478,10 +1478,10 @@ public class WarplyManagerHelper {
}
public
static
void
logoutUser
()
{
if
(
isMyServiceRunning
(
WarplyHealthService
.
class
))
{
Intent
stepsServiceIntent
=
new
Intent
(
Warply
.
getWarplyContext
(),
WarplyHealthService
.
class
);
Warply
.
getWarplyContext
().
stopService
(
stepsServiceIntent
);
}
//
if (isMyServiceRunning(WarplyHealthService.class)) {
//
Intent stepsServiceIntent = new Intent(Warply.getWarplyContext(), WarplyHealthService.class);
//
Warply.getWarplyContext().stopService(stepsServiceIntent);
//
}
}
private
static
boolean
isMyServiceRunning
(
Class
<?>
serviceClass
)
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
View file @
ee6ee87
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
View file @
ee6ee87
...
...
@@ -425,12 +425,12 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
if
(!
EventBus
.
getDefault
().
isRegistered
(
this
))
EventBus
.
getDefault
().
register
(
this
);
if
(
mWebviewLoaded
)
{
String
scriptSourceInit
=
"webviewDidFocus("
+
String
.
valueOf
(
mWebviewLoaded
)
+
","
+
String
.
valueOf
(
isMyServiceRunning
(
WarplyHealthService
.
class
))
+
");"
;
WarpView
.
this
.
evaluateJavascript
(
scriptSourceInit
,
s
->
{
});
}
//
if (mWebviewLoaded) {
//
String scriptSourceInit = "webviewDidFocus(" + String.valueOf(mWebviewLoaded) + "," + String.valueOf(isMyServiceRunning(WarplyHealthService.class)) + ");";
//
WarpView.this.evaluateJavascript(scriptSourceInit, s -> {
//
//
});
//
}
}
@Override
...
...
@@ -561,9 +561,9 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
// EventBus.getDefault().post(new WarplyEventBusManager(pacingVisible));
// }
WarplyHealthEventModel
healthActive
=
new
WarplyHealthEventModel
();
healthActive
.
setActivated
(
true
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
healthActive
));
//
WarplyHealthEventModel healthActive = new WarplyHealthEventModel();
//
healthActive.setActivated(true);
//
EventBus.getDefault().post(new WarplyEventBusManager(healthActive));
}
else
if
(
parts
[
1
].
equals
(
"steps"
)
&&
parts
[
2
].
equals
(
"shortcutDisabled"
))
{
// This is for the pacing service
// Intent stepsServiceIntent = new Intent(Warply.getWarplyContext(), WarplyHealthService.class);
// Warply.getWarplyContext().stopService(stepsServiceIntent);
...
...
@@ -572,9 +572,9 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
// pacingVisible.setVisible(false);
// EventBus.getDefault().post(new WarplyEventBusManager(pacingVisible));
WarplyHealthEventModel
healthActive
=
new
WarplyHealthEventModel
();
healthActive
.
setActivated
(
false
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
healthActive
));
//
WarplyHealthEventModel healthActive = new WarplyHealthEventModel();
//
healthActive.setActivated(false);
//
EventBus.getDefault().post(new WarplyEventBusManager(healthActive));
}
else
if
(
parts
[
1
].
equals
(
"request"
)
||
parts
[
1
].
equals
(
"response"
))
{
WarpUtils
.
log
(
"**************** WARPLY Webview Log START *****************"
);
WarpUtils
.
log
(
message
);
...
...
Please
register
or
login
to post a comment