Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25665] Android: Update Ti.Playservices libraries to latest (11.8.0?)

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 7.0.2
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterHans Knöchel
AssigneeUnknown
Created2018-01-12T12:08:10.000+0000
Updated2019-02-12T16:33:50.000+0000

Description

[~titanium@webmasterei-hamburg.de] noticed that there is a new version of the play-services available (11.8.0?). Right now we use 11.0.1, so we should update the aar's and deliver the new version with SDK 7.1.0. Of course, open source developers will be able to use the new version once merged already.

Comments

  1. Rainer Schleevoigt 2018-01-12

    Thanks! One question: how can I feed me folder /opt/android-sdk/extras/google/m2repository/com/google with this new version. SDK manager shows me 46 as newest version in SDK-Tools tab. But in mentioned folder I still see 11.0.4.
  2. Hans Knöchel 2018-01-12

    I think via Android Studio. But I've even done that and begin to suspect that 11.8.0 is not the latest GA / stable version. Can someone ([~gmathews], [~ybanev], [~michael]) confirm this?
  3. Hans Knöchel 2018-01-12

    PR: https://github.com/appcelerator-modules/ti.playservices/pull/9 A few libraries have been removed and replaced by Google.
  4. Joshua Quick 2018-01-12

    [~hknoechel], I recommend that we do NOT upgrade to the newest Google Play Services. There's a reason why we've kept it behind for the moment. The Google Play Services library is mostly an interface that does IPC (inter-process communications) with the invisible Google Play Services APK/app that is installed on the device. The problem here is if your app uses a Google Play Services JAR files that is newer a version than the Google Play Services APK installed on the device, then the JAR's APIs will fail. What we're supposed to do is query the system for a version >= to the JAR that we're using. Typically, on app startup. And if the system has an older version, then we request Google Play to download/install it. This is according to Google's docs below. We're not currently doing this right now, and because of this, we should avoid using the newest version at the moment to decrease the likeliness of this scenario. https://developers.google.com/android/guides/setup#ensure_devices_have_the_google_play_services_apk I can see 2 solutions to this problem:

    We can add APIs to our new "ti.playservices" library and let Titanium developers do this themselves on app startup. However, this is inconvenient and I'm sure most devs won't know they need to do this.

    We can do it automatically on startup, while the launch/splashscreen is shown, and ensure Google Play Services is installed before executing the main JavaScript.

  5. Hans Knöchel 2018-01-13

    [~jquick] Thanks for the insight, I didn't know that. I would wonder how other platforms solve this issue to stay both updated and flexible. *EDIT*: One thing though: I remember that 11.0.4 was latest at the time we introduced it as well and we already expose utilities for the devs to guard the play-services availability using the isGooglePlayServicesAvailable() method. So developers know that they need to use playservices-related API's like that. So I don't see how that changes with this update, but let me know.
  6. Rainer Schleevoigt 2018-01-15

    On the other hand: if i add firebase 11.4.0 to project via gradle then google playservice with same version will used/installed to dummy app.
  7. Joshua Quick 2018-01-16

    I've seen a Titanium developer get burned by this last year. So please, let's not update it yet. Doing so will likely break apps. Our new "ti.playservices" module does expose the makeGooglePlayServicesAvailable() method needed to display a dialog asking the end-user if it's okay to download the newest Google Play Services, but this API is incomplete since it does not provide a listener indicating that it was successful. So, Titanium devs don't have all of the tools needed to do this themselves yet... and ideally we should do this automatically on app launch since most Titanium devs aren't aware that they need to do this.
  8. Greg 2018-05-23

  9. Hans Knöchel 2019-02-12

    Can this *please* get some attention? 11.0.4 is nearly 1.5 years old and all other frameworks updated to latest quite a while ago. This blocks many developers from updating their modules (like firebase analytics/crash/cloud-messaging) to current version. If people worry about stability or the "prompt" of non-available play-services, they can handle it, but blocking releases because of that reason seems not correct.

JSON Source