Skip to content

Latest commit

 

History

History
59 lines (49 loc) · 1.77 KB

README.md

File metadata and controls

59 lines (49 loc) · 1.77 KB

ti.playservices

To provide Google Play Services for Titanium modules and applications

Requirements

  • Titanium Mobile SDK 7.0.0 or later (release 12/2017)

Example

Add the module as a dependency to your application by adding a <module> item to the <modules> element of your tiapp.xml file:

<ti:app>
  ...
  <modules>
    <module platform="android">ti.playservices</module>
  </modules>
  ...
</ti:app>

Use require() to access the module from JavaScript:

    var PlayServices = require('ti.playservices');

The PlayServices variable is a reference to the module. Make API calls using this reference:

    var playServicesAvailable = PlayServices.isGooglePlayServicesAvailable();

Or include the module as a dependency to a native module by adding a <module> item to the <modules> element of your timodule.xml file:

<ti:module>
  ...
  <modules>
    <module platform="android">ti.playservices</module>
  </modules>
  ...
</ti:module>

For a detailed API example please see android/example/app.js

Build

appc run -p android --build-only from the android directory

Author

Axway

License

Apache 2.0

Contributing

Code contributions are greatly appreciated, please submit a new pull request!