MobileFacts - development (android)
Prerequisites:
- Download Android sdk https://developer.android.com/sdk/index.html
- Install Cordova Command Line Interface: http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html
- Edit your path variable:Â
PATH=/path/to/android-sdk-linux_x86/tools/:/path/to/android-sdk-linux_x86/platform-tools/:$PATH
Commands for development:
- Test in emulator:
cordova emulate android
Upload on device:
cordova run --device
See logs (device/emulator):
adb logcat
For more have a look at the CLI-Guide: http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html
Â
Important notice:Â In case of our MobileFacts app the Sensor-Library has do be advised to send the collected data directly via IOLSession.sendLoggedEvents();.
Steps to create the MobileFacts under cordova 3.4.
- editÂ
MobileFacts/platforms/android/AndroidManifest.xml
and adjust theandroid:versionCode
(mandatory for new release) and theÂandroid:versionName
- add the SpringPlugin, which includes the mobile sensor to the project Â
cordova plugin add ../SpringPlugin
- cd intoÂ
MobileFacts/platforms/android
and execute Âant release
- sign the apk:Â
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -signedjar ../bin/MobileFacts-release-signed.apk -keystore ../keys/keystore-android ../bin/MobileFacts-release-unsigned.apk mobile-facts
- align the apk:Â
zipalign 4Â bin/MobileFacts-release-signed.apk bin/MobileFacts-release-signed-aligned.apk
Done (upload the MobileFacts-release-signed-aligned.apk to the store)