lwc:programming:mobile:cordova_phonegap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

lwc:programming:mobile:cordova_phonegap [2020/11/26 22:35] – created John Harrisonlwc:programming:mobile:cordova_phonegap [2020/11/27 20:10] (current) John Harrison
Line 1: Line 1:
 Notes on v 3.4.0: Notes on v 3.4.0:
- 
-\\ 
- 
  
 Make all of your changes in the parent directory that all platforms will reference. Then build your code for the specific platform. Here's a nice shortcut: Make all of your changes in the parent directory that all platforms will reference. Then build your code for the specific platform. Here's a nice shortcut:
  
 cordova emulate --target="ipad (retina)" cordova emulate --target="ipad (retina)"
- 
  
 will rebuild the code, then run on the simulator will rebuild the code, then run on the simulator
Line 14: Line 10:
  
 will rebuild the code, the load on the device. Because of a bug you need to run the app on the device manually. will rebuild the code, the load on the device. Because of a bug you need to run the app on the device manually.
- 
-\\ 
- 
  
   * If things aren't rebuilding right regarding plugins,[[http://stackoverflow.com/questions/18403225/phonegap-3-0-ios-plugins-not-found|this script]] might help   * If things aren't rebuilding right regarding plugins,[[http://stackoverflow.com/questions/18403225/phonegap-3-0-ios-plugins-not-found|this script]] might help
   * can we just forget about PG and use Cordova only? :-)   * can we just forget about PG and use Cordova only? :-)
- 
  
 Disable status bar: Disable status bar:
Line 29: Line 21:
  
 Get console log info: Get console log info:
- 
- 
   * phonegap local plugin add https:%%//%%git-wip-us.apache.org/repos/asf/cordova-plugin-console.git   * phonegap local plugin add https:%%//%%git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
  
 Know what device you are on: Know what device you are on:
- 
   * cordova plugin add org.apache.cordova.device   * cordova plugin add org.apache.cordova.device
  
 Media: Media:
- 
  
   * cordova plugin add https:%%//%%git-wip-us.apache.org/repos/asf/cordova-plugin-media.git   * cordova plugin add https:%%//%%git-wip-us.apache.org/repos/asf/cordova-plugin-media.git
-  *  
   * cordova plugin add org.apache.cordova.file (yes you need this for media to work or you get a CDVfile error not found)   * cordova plugin add org.apache.cordova.file (yes you need this for media to work or you get a CDVfile error not found)
- 
  
 Pause Event (iOS): Pause Event (iOS):
- 
  
   * console.log actually does work on a pause event   * console.log actually does work on a pause event
Line 53: Line 38:
  
 Storage: Storage:
- 
- 
   * localStorage will persist of app is killed, but sessionStorage will not   * localStorage will persist of app is killed, but sessionStorage will not
   * both localStorage and sessionStorage have a quota of 5MB on iOs   * both localStorage and sessionStorage have a quota of 5MB on iOs
  
 [[http://stackoverflow.com/questions/1248081/get-the-browser-viewport-dimensions-with-javascript|Width and height]] [[http://stackoverflow.com/questions/1248081/get-the-browser-viewport-dimensions-with-javascript|Width and height]]
- 
- 
-\\ 
- 
  
 ==== Updating Plugins ==== ==== Updating Plugins ====
Line 70: Line 49:
   * check: cordova-check-plugins   * check: cordova-check-plugins
   * update: cordova-check-plugins --update=auto   * update: cordova-check-plugins --update=auto
- 
- 
-\\ 
- 
  
 ===== Running on Android ===== ===== Running on Android =====
  
   * To accept licenses:   * To accept licenses:
- 
  
 ===== Creating a release version: Android ===== ===== Creating a release version: Android =====
Line 87: Line 61:
 edit /platforms/android/AndroidManifest.xml so that debuggable is set to false edit /platforms/android/AndroidManifest.xml so that debuggable is set to false
   * update: as of Cordova 5.x you can't hardcode debuggable anymore. If you really want to (for example debuggable = true with release (for inapp purchase testing)) edit  platforms/android/build.gradleand add in the android { section:    * update: as of Cordova 5.x you can't hardcode debuggable anymore. If you really want to (for example debuggable = true with release (for inapp purchase testing)) edit  platforms/android/build.gradleand add in the android { section: 
- +<code>
- +
-<HTML><blockquote> +
-<HTML><blockquote> +
-<HTML><blockquote>+
 lintOptions { lintOptions {
-</blockquote></HTML></blockquote></HTML> 
-<HTML><blockquote> 
-<HTML><blockquote> 
     checkReleaseBuilds false     checkReleaseBuilds false
-</blockquote></HTML></blockquote></HTML> 
-<HTML><blockquote> 
-<HTML><blockquote> 
 } }
-</blockquote></HTML></blockquote></HTML></blockquote></HTML>+</code>
   * note: you **must** use the same keystore file for all versions of the same app   * note: you **must** use the same keystore file for all versions of the same app
  
Line 113: Line 77:
  
 After running the jarsigner it is necessary to run the zip align tool: After running the jarsigner it is necessary to run the zip align tool:
- 
- 
   * Format: zipalign -v 4 <signed.apk> <zip-aligned-signed-apk>   * Format: zipalign -v 4 <signed.apk> <zip-aligned-signed-apk>
   * Example: /home/user/dev/android-sdk-linux/build-tools/23.0.1/zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release.apk   * Example: /home/user/dev/android-sdk-linux/build-tools/23.0.1/zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release.apk
  
 ==== Splash Screen ==== ==== Splash Screen ====
- 
- 
   * Generate Automatically: http://ticons.fokkezb.nl/   * Generate Automatically: http://ticons.fokkezb.nl/
  
  
  
  • lwc/programming/mobile/cordova_phonegap.1606451758.txt.gz
  • Last modified: 2020/11/26 22:35
  • by John Harrison