This is an old revision of the document!
Push Notification:
- https://firebase.google.com/docs/cloud-messaging/android/client
Installing dev environment for Cordova
- sudo apt-get install ant
- install sun java 7 (it appears OpenJDK doesn't work)
Extracting apk:
from here:
- find out the package name: adb shell pm list packages
- get the path of the package: adb shell pm path com.example.someapp
- pull the apk from the device: adb pull /data/app/com.example.someapp-2.apk
Other
from this source to set the position of the emulator:
- cd ~/.android/avd/<image name>
- 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 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 here
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 <application android:debuggable=“false”
- Cordova: in config.xml set <preference name=“loglevel” value=“ERROR” /> (normally it's DEBUG or nothing)
Splash Screens
The easy way to do splash screens for Android and maybe iOS is:
- make a png file that is 2208×2208 with center (non-stretchable) image 1200×1200. Save in the root directory of the cordova project as splash.png
- use 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:
<HTML><blockquote> <HTML><blockquote> <platform name=“android”>
</blockquote></HTML> <HTML><blockquote> <allow-intent href=“market:*” />
</blockquote></HTML> <HTML><blockquote> <splash src=“res/screen/android/splash-land-hdpi.png” density=“land-hdpi”/>
</blockquote></HTML> <HTML><blockquote> <splash src=“res/screen/android/splash-land-ldpi.png” density=“land-ldpi”/>
</blockquote></HTML> <HTML><blockquote> <splash src=“res/screen/android/splash-land-mdpi.png” density=“land-mdpi”/>
</blockquote></HTML> <HTML><blockquote> <splash src=“res/screen/android/splash-land-xhdpi.png” density=“land-xhdpi”/>
</blockquote></HTML> <HTML><blockquote>
</blockquote></HTML> <HTML><blockquote> <splash src=“res/screen/android/splash-port-hdpi.png” density=“port-hdpi”/>
</blockquote></HTML> <HTML><blockquote> <splash src=“res/screen/android/splash-port-ldpi.png” density=“port-ldpi”/>
</blockquote></HTML> <HTML><blockquote> <splash src=“res/screen/android/splash-port-mdpi.png” density=“port-mdpi”/>
</blockquote></HTML> <HTML><blockquote> <splash src=“res/screen/android/splash-port-xhdpi.png” density=“port-xhdpi”/>
</blockquote></HTML> <HTML><blockquote> </platform>
</blockquote></HTML></blockquote></HTML>
- 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
<HTML><blockquote>
<HTML><blockquote>
</blockquote></HTML></blockquote></HTML>