Skip to content

Commit

Permalink
Merge pull request #362 from prashantsaini1/master
Browse files Browse the repository at this point in the history
feat(android): upgrade `play-services-base` to `18.5.0`
  • Loading branch information
hansemannn authored Mar 3, 2025
2 parents 69083d0 + a3cbab3 commit 931eea2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

dependencies {
// Needed to check for Google Play Services availability on device.
implementation 'com.google.android.gms:play-services-base:18.3.0'
implementation 'com.google.android.gms:play-services-base:18.5.0'

// App devs expect adding "ti.playservices" will enable "Fused Location" support to "Ti.Gelocation" APIs.
// So, we must add this library to support it, even though this module doesn't use this library at all.
implementation 'com.google.android.gms:play-services-location:21.1.0'
implementation 'com.google.android.gms:play-services-location:21.3.0'
}
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 18.3.0
version: 18.5.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: Titanium Google Play Services module.
Expand Down
10 changes: 3 additions & 7 deletions android/src/ti/playservices/PlayServicesModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.tasks.Task;
import java.util.concurrent.CancellationException;
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.KrollFunction;
import org.appcelerator.kroll.KrollModule;
Expand Down Expand Up @@ -79,13 +78,10 @@ public void makeGooglePlayServicesAvailable(final KrollFunction callback)
}

// Fetch the top-most activity.
Activity activity = TiApplication.getAppCurrentActivity();
Activity activity = TiApplication.getAppRootOrCurrentActivity();
if (activity == null) {
activity = TiApplication.getInstance().getRootActivity();
if (activity == null) {
callback.callAsync(getKrollObject(), createEventForMakeAvailable(resultCode));
return;
}
callback.callAsync(getKrollObject(), createEventForMakeAvailable(resultCode));
return;
}

// Display Google's standard dialog asking end-user to update Google Play Services.
Expand Down

0 comments on commit 931eea2

Please sign in to comment.