Differences
This shows you the differences between two versions of the page.
| lwc:programming:mobile:cordova_phonegap [2020/11/26 22:35] – created John Harrison | lwc: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=" | cordova emulate --target=" | ||
| - | |||
| 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, |   * If things aren't rebuilding right regarding plugins, | ||
| * 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: |   * phonegap local plugin add https: | ||
| 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: |   * cordova plugin add https: | ||
| - | * | ||
| * 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:// | [[http:// | ||
| - | |||
| - | |||
| - | \\ | ||
| - | |||
| ==== 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 / | edit / | ||
|   * 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/ |   * 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/ | ||
| - | + | <code> | |
| - | + | ||
| - | <HTML>< | + | |
| - | < | + | |
| - | < | + | |
| lintOptions { | lintOptions { | ||
| - | </ | ||
| - | < | ||
| - | < | ||
| checkReleaseBuilds false | checkReleaseBuilds false | ||
| - | </ | ||
| - | < | ||
| - | < | ||
| } | } | ||
| - | </blockquote></ | + | </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 < |   * Format: zipalign -v 4 < | ||
|   * Example: |   * Example: | ||
| ==== Splash Screen ==== | ==== Splash Screen ==== | ||
| - | |||
| - | |||
|   * Generate Automatically: |   * Generate Automatically: | ||