Skip to content

Commit

Permalink
Updated to HyperTrack SDK v4.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
deniszpua committed Nov 27, 2020
1 parent f46bf37 commit adaa3a2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 144 deletions.
12 changes: 2 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,8 @@ captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/misc.xml
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
.idea/*

# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

Expand Down
116 changes: 0 additions & 116 deletions .idea/codeStyles/Project.xml

This file was deleted.

8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ configurations.all {
}

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.hypertrack.live"
minSdkVersion 19
targetSdkVersion 29
targetSdkVersion 30
versionCode project.ext.versionNumber
versionName project.ext.versionName
testInstrumentationRunner
Expand Down Expand Up @@ -91,7 +91,7 @@ dependencies {

implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.16.7'

implementation 'com.hypertrack:hypertrack:4.5.3'
implementation 'com.hypertrack:hypertrack:4.8.0'
implementation 'com.hypertrack:hypertrack-views:0.8.6'
implementation 'com.hypertrack:maps-google:0.1.8'
implementation project(':hypertrack-backend')
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:required="false" />

<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" tools:node="remove" />

<uses-feature
android:glEsVersion="0x00020000"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/hypertrack/live/LaunchActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.MarkerOptions;
import com.hypertrack.live.auth.ConfirmFragment;
import com.hypertrack.live.auth.SignInFragment;
import com.hypertrack.live.ui.LoaderDecorator;
import com.hypertrack.live.ui.MainActivity;
import com.hypertrack.live.utils.SharedHelper;
import com.hypertrack.maps.google.widget.GoogleMapConfig;

import org.json.JSONObject;

Expand Down
13 changes: 1 addition & 12 deletions app/src/main/java/com/hypertrack/live/PermissionsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,14 @@ public static boolean isActivityRecognitionPermissionApproved(Context context) {
Manifest.permission.ACTIVITY_RECOGNITION) == PackageManager.PERMISSION_GRANTED;
}

public static boolean isBackgroundLocationPermissionApproved(Context context) {
return android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.Q
|| ContextCompat.checkSelfPermission(context,
Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_GRANTED;
}

public static boolean isAllPermissionsApproved(Context context) {
return isAccessFineLocationPermissionApproved(context)
&& isActivityRecognitionPermissionApproved(context)
&& isBackgroundLocationPermissionApproved(context);
&& isActivityRecognitionPermissionApproved(context);
}

public static void requestPermissions(Activity activity, int requestCode) {
boolean permissionAccessCoarseLocationApproved = isAccessFineLocationPermissionApproved(activity);
boolean permissionActivityRecognitionApproved = isActivityRecognitionPermissionApproved(activity);
boolean permissionBackgroundLocationApproved = isBackgroundLocationPermissionApproved(activity);

List<String> permissions = new ArrayList<>();
if (!permissionAccessCoarseLocationApproved) {
Expand All @@ -50,9 +42,6 @@ public static void requestPermissions(Activity activity, int requestCode) {
if (!permissionActivityRecognitionApproved) {
permissions.add(Manifest.permission.ACTIVITY_RECOGNITION);
}
if (!permissionBackgroundLocationApproved) {
permissions.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
}
}

ActivityCompat.requestPermissions(activity, permissions.toArray(new String[0]), requestCode);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ allprojects {

task clean(type: Delete) { delete rootProject.buildDir }

version = "3.9.0"
version = "3.10.0"

0 comments on commit adaa3a2

Please sign in to comment.