===== Push Notification: ===== * https:%%//%%firebase.google.com/docs/cloud-messaging/android/client ===== Installing dev environment for Cordova ===== * sudo apt-get install ant * [[http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre|install sun java 7]] (it appears OpenJDK doesn't work) ===== Other ===== from [[http://stackoverflow.com/questions/11572485/the-android-emulator-is-out-of-view-how-can-i-move-it|this source]] to set the position of the emulator:  * cd ~/.android/avd/ * edit emulator-user.ini and set window.x and window.y 4.4.2 emulator won't rotate to landscape. To force rotation, load the camera app. Alternatively, this [[https://play.google.com/store/apps/details?id=com.googlecode.eyesfree.setorientation|open source app]] apk is available online 4.0.3 emulator crashes with some message about the launcher. Set heat size higher and check the path to the skin. Details [[http://stackoverflow.com/questions/9155417/android-4-0-emulator-always-has-a-crashing-launcher|here]] [[http://developer.android.com/tools/help/emulator.html|emulator keys]] [[http://stackoverflow.com/questions/11154222/google-play-on-android-4-0-emulator|this]] explains how to get Google Play on an emulator. Note that play will be gone when the emulator restarts to turn debug mode off: * in AndroidManifest.xml set (normally it's DEBUG or nothing)\\ [[http://stackoverflow.com/questions/4567904/how-to-start-an-application-using-android-adb-tools|how to start an application with adb]] ===== Splash Screens ===== * [[http://stackoverflow.com/questions/13487124/android-splash-screen-sizes-for-ldpi-mdpi-hdpi-xhdpi-displays-eg-1024x76|splash screen sizes]] The easy way to do splash screens for Android and maybe iOS is: * make a png file that is 2208x2208 with center (non-stretchable) image 1200x1200. Save in the root directory of the cordova project as splash.png * use [[https://github.com/AlexDisler/cordova-splash|this utility]] * if you leave the splash screens where the utility puts them, they won't be used and they will be deleted. Instead move them outside of the platform directory. Follow this example config file:                                                              * add the splashscreen plugin (it doesn't work without it): cordova plugin add cordova-plugin-splashscreen * iOS: splash screen work as-is without moving or renaming them and without any changes to the config.xml file. * //This information was correct as of cordova 5.3.3// ==== Handy Dandy commands ==== * aapt in ''build-tools'' is your friend: * get package name: ''./aapt dump badging /tmp/YOUR_APK_FILE|awk -F" " '/launchable-activity/ {print $2}'|awk -F"'" '/name=/ {print $2}'' * get default activity run on launch: ''./aapt dump badging /tmp/YOUR_APK_FILE|awk -F" " '/launchable-activity/ {print $2}'|awk -F"'" '/name=/ {print $2}'' ===== Random ===== * OTA App updater: [[https://blog.vivekpanyam.com/evolve-seamlessly-deploy-android-apps-to-users/|Evolve]] * [[https://stackoverflow.com/questions/15813767/connect-to-wifi-programmatically-in-google-android/17643242|Connect to Wi-Fi programmatically]] * [[https://dev.to/larsonzhong/most-complete-adb-commands-4pcg|complete guide to adb]]