Panagiotis Triantafyllou

REMOVE STEPS

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.5.4r32'
PUBLISH_VERSION = '4.5.5.4r33'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -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>-->
<!--&lt;!&ndash; <action android:name="android.intent.action.BOOT_COMPLETED" />&ndash;&gt;-->
<!-- <action android:name="android.intent.action.RESTART" />-->
<!-- </intent-filter>-->
<!-- </receiver>-->
<!-- <provider-->
<!-- android:name=".utils.WarplyProvider"-->
......
......@@ -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) {
......
......@@ -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);
......