An android application to monitor phone state and send it periodically to AirVantage platform.
Official application is available on Play Store
Code is published here only as an example of how to use AirVantage APIs from an Android Application.
Tested with Android
4.4.2
### Configuration
You need to edit mainActivity/build/intermediates/assets/debug/avphone.properties
to specify Airvantage API clients on NA
and EU
instances.
If API clients are missing, login pages will display an error page:
Something went wrong
Button appears as soon as clientid.custom
is defined.
Define clientid.custom
in mainActivity/src/main/assets/avphone.properties
.
clientid.na=CHANGEME
clientid.eu=CHANGEME
clientid.custom=IF_YOU_NEED # <= Here
Define pref_server_custom_value
in mainActivity/src/main/res/values/strings.xml
.
It has to be accessible from https://
.
<string name="pref_server_custom">Custom</string>
<!-- Change following -->
<string name="pref_server_custom_value">get.some.io</string>
When checking out, code will probably not compile because of Crashlytics, install Crashlytics Android Studio plugin.
mainActivity/src/main/assets/crashlytics-build.properties
must not be stored,
it's listed in .gitignore
.
-
Increase version number in:
mainActivity/build.gradle
mainActivity/src/main/AndroidManifest.xml
-
Using Build > Generate Signed APK...
- Use
airvantagekeystore.jks
, stored in AWS as Key store path. - You'll find it's password in file stored in the same folder
- Select the only proposed key alias
- Enter the same password as for the key store
- Hit Next
- Select destination folder
- Select release build type
- Hit Finish
- Use
-
Go to Developer Console/APK section
-
Hit the Upload new APK to production button and follow instructions
-
🎉