Monday, September 19, 2016

Practising Ionic

Run android emulator is super slow. Genymotion is a good emulator.
Start android device from Genymotion, then "ionic run android"

Ionic serve is good for testing browser-related functions, but not good for native functions, such like sqlite or camera, etc.

To test sqlite or carema, use adb (android debug bridge).
https://developer.android.com/studio/command-line/adb.html

ionic build android
adb install -r platforms/android/build/outputs/apk/android-debug.apk
if multiple devices are connected with the computer, use -s to specify one
adb -s 192.168.71.101:5555 install -r platforms/android/build/outputs/apk/android-debug.apk

adb logcat
Just a snippet for the terminal just to show only the console.log() statements if someone needs it.
adb logcat | grep -i "console"


release a apk file
cordova build --release android

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore -storepass password platforms/android/build/outputs/apk/android-release-unsigned.apk alias_name

c:\Users\HAIRINWIND\AppData\Local\Android\sdk\build-tools\23.0.1\zipalign -vf 4 platforms/android/build/outputs/apk/android-release-unsigned.apk mandyChris.apk



No comments:

Post a Comment