| 1 | = Development Environment = |
| 2 | [[TOC]] |
| 3 | |
| 4 | Eden Mobile is built on the [https://cordova.apache.org Apache Cordova] platform (sometimes known as Adobe !PhoneGap). |
| 5 | |
| 6 | 1. Cordova runs on '''NodeJS'''. If your OS distribution does not provide a NodeJS bundle, you can get one from here: |
| 7 | |
| 8 | - [https://nodejs.org/en/download https://nodejs.org/en/download] |
| 9 | |
| 10 | 2. Use the NodeJS package manager ''npm'' to install Cordova: |
| 11 | |
| 12 | {{{ |
| 13 | npm install -g cordova |
| 14 | }}} |
| 15 | |
| 16 | See also: [https://cordova.apache.org/#getstarted https://cordova.apache.org/#getstarted] |
| 17 | |
| 18 | 3. If you want to build and test !EdenMobile, you also need an SDK for the target platform, e.g.: |
| 19 | |
| 20 | - [https://developer.android.com/studio/index.html#downloads Android SDK] |
| 21 | - Ensure the SDK tools are in your PATH, e.g. for Windows 10: |
| 22 | * %USERPROFILE%\!AppData\local\android\sdk\platform-tools |
| 23 | * %USERPROFILE%\!AppData\local\android\sdk\tools |
| 24 | |
| 25 | 4. You can fork/clone !EdenMobile from here: |
| 26 | |
| 27 | - [https://github.com/sahana/eden_mobile https://github.com/sahana/eden_mobile] |
| 28 | |
| 29 | 5. Run the application |
| 30 | |
| 31 | - You canot run in the 'browser' platform as it doesn't support the local database |
| 32 | - It is easier to run on a real device than the emulator |
| 33 | - to run on a real device, you need to enable 'Developer Options' by tapping 7 times on the 'Build Number' in the About section (http://www.greenbot.com/article/2457986/how-to-enable-developer-options-on-your-android-phone-or-tablet.html) and then open the new Developer Options panel & enable USB Debugging |
| 34 | - see also: [wiki:DeveloperGuidelines/EdenMobile/Debugging#RemoteDebuggingonAndroidDevice Remote-Debugging on Android Device] |
| 35 | - to run on emulator you need to create an avd: {{{android avd}}} |
| 36 | {{{ |
| 37 | cd eden_mobile |
| 38 | npm install q-io |
| 39 | cordova platform add android |
| 40 | adb uninstall org.sahanafoundation.eden_mobile # Shouldn't be required but can be for some systems |
| 41 | cordova run android # Builds apk & adb install platforms\android\build\outputs\apk\android-debug.apk |
| 42 | }}} |
| 43 | |