Affects Version/s: None
Fix Version/s: Release 9.0.0
Sprint:2018 Sprint 04 SDK, 2018 Sprint 06 SDK, 2018 Sprint 07 SDK, 2018 Sprint 08 SDK, 2018 Sprint 09 SDK
The Google Play Services libraries (included with "ti.playservices" module) are merely an interface to the installed Google Play Services app/apk. The app must ensure that Google Play Services is installed on the device and that its apk version is greater or equal to the version of the Google Play Services libraries that the app includes... or else the library's APIs will fail or throw an exception.
Google documents the above here...
- The Google Play Services check should be done when the Titanium splashscreen is displayed (ie: TiLaunchActivity.java) and before executing the "app.js" script.
- Do not run the check if "ti.playservices" module is not included in the app. (In this case, assume app does not use Google Play Services.)
- If Google Play Services is found to be too old or disabled, display an alert asking end-user to resolve it. Keep the end-user on the launcher screen in this case.
- If end-user chooses to update Google Play Services, remain on the launcher screen until the download completes, then proceed on to execute the "app.js" script.
- Do not display an alert if the device does not have Google Play installed and proceed to execute the "app.js" script. In this case, assume the app is not distributed via the Google Play app store (such as Amazon) or the app is running via an emulator without Google Play installed.
- Add "tiapp.xml" boolean property "ti.playservices.validate.on.startup" which when set false will disable this feature. In this case, it is the app developer's responsibility to manage this.
Currently, Titanium's "ti.playservices" module purposely uses Google Play Services library versions a few revs old to avoid the failure mentioned above. Once we update a Titanium app to install the newest version of Google Play Services on startup, we no longer have to fear this issue and we can keep the module's libraries up-to-date.