Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25726

Android: Ensure device's installed Google Play Services is available/updated on app startup

    Details

    • Story Points:
      5
    • Sprint:
      2018 Sprint 04 SDK, 2018 Sprint 06 SDK, 2018 Sprint 07 SDK, 2018 Sprint 08 SDK, 2018 Sprint 09 SDK

      Description

      Summary:
      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...
      https://developers.google.com/android/guides/setup#ensure_devices_have_the_google_play_services_apk

      Feature Requirements:

      1. The Google Play Services check should be done when the Titanium splashscreen is displayed (ie: TiLaunchActivity.java) and before executing the "app.js" script.
      2. 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.)
      3. 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.
      4. 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.
      5. 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.
      6. 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.

      Note:
      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jquick Joshua Quick
                Reviewer:
                Gary Mathews
                Tester:
                Lokesh Choudhary
              • Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration