Next revision | Previous revision |
lwc:programming:mobile:android [2020/11/26 22:34] – created John Harrison | lwc:programming:mobile:android [2022/01/03 12:18] (current) – [Random] John Harrison |
---|
| |
* https:%%//%%firebase.google.com/docs/cloud-messaging/android/client | * https:%%//%%firebase.google.com/docs/cloud-messaging/android/client |
| |
| |
===== Installing dev environment for Cordova ===== | ===== Installing dev environment for Cordova ===== |
* sudo apt-get install ant | * 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) | * [[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) |
| |
| |
===== Extracting apk: ===== | |
| |
from [[http://stackoverflow.com/questions/4032960/how-do-i-get-an-apk-file-from-an-android-device|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 ===== | ===== Other ===== |
* 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: | * 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: |
| |
| <code> |
<HTML><blockquote> | |
<HTML><blockquote> | |
<platform name="android"> | <platform name="android"> |
| |
| |
</blockquote></HTML> | |
<HTML><blockquote> | |
<allow-intent href="market:*" /> | <allow-intent href="market:*" /> |
| |
</blockquote></HTML> | |
<HTML><blockquote> | |
<splash src="res/screen/android/splash-land-hdpi.png" density="land-hdpi"/> | <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"/> | <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"/> | <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"/> | <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"/> | <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"/> | <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"/> | <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"/> | <splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/> |
| |
</blockquote></HTML> | |
<HTML><blockquote> | |
</platform> | </platform> |
| </code> |
</blockquote></HTML></blockquote></HTML> | |
* add the splashscreen plugin (it doesn't work without it): cordova plugin add cordova-plugin-splashscreen | * 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. | * 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// | * //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 ===== |
<HTML><blockquote> | * OTA App updater: [[https://blog.vivekpanyam.com/evolve-seamlessly-deploy-android-apps-to-users/|Evolve]] |
<HTML><blockquote> | * [[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]] |
| |
</blockquote></HTML></blockquote></HTML> | |