Version 6 (modified by 8 years ago) ( diff ) | ,
---|
Development Environment
Table of Contents
Eden Mobile is built on the Apache Cordova platform (sometimes known as Adobe PhoneGap).
- Cordova runs on NodeJS. If your OS distribution does not provide a NodeJS bundle, you can get one from here:
- Use the NodeJS package manager npm to install Cordova:
npm install -g cordova
See also: https://cordova.apache.org/#getstarted
- If you want to build and test EdenMobile, you also need an SDK for the target platform, e.g.:
- Android SDK
- Ensure the SDK tools are in your PATH, e.g. for Windows 10:
- %USERPROFILE%\AppData\local\android\sdk\platform-tools
- %USERPROFILE%\AppData\local\android\sdk\tools
- Ensure the SDK tools are in your PATH, e.g. for Windows 10:
- You can fork/clone EdenMobile from here:
- Run the application
- You canot run in the 'browser' platform as it doesn't support the local database
- It is easier to run on a real device than the emulator
- 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
- see also: Remote-Debugging on Android Device
- to run on emulator you need to create an avd:
android avd
cd eden_mobile npm install q-io cordova platform add android adb uninstall org.sahanafoundation.eden_mobile # Shouldn't be required but can be for some systems cordova run android # Builds apk & adb install platforms\android\build\outputs\apk\android-debug.apk
- Build for Release
- Configure the default server, if-required:
www/config/settings.js
'url': { type: 'url', defaultValue: 'http://my.server.org/eden', writable: false,
- @ToDo: Branding
- create the non-debug APK
cd eden_mobile cordova build --release android
- File available as:
platforms/android/build/outputs/apk/android-release-unsigned.apk
- Sign the app:
- https://developer.android.com/studio/publish/app-signing.html
- https://cordova.apache.org/docs/en/latest/guide/platforms/android/
# Generate Private Key (just once, outside the eden_mobile folder) # keytool comes with your JRE, so may need to ensure it's bin directory is in your PATH keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias # Optimise (zipalign comes with Android SDK build-tools, so may need to ensure it's in your PATH, e.g. %USERPROFILE%\AppData\local\android\sdk\build-tools\25.0.2) zipalign -v -p 4 android-release-unsigned.apk android-release-unsigned-aligned.apk # Sign (apksigner comes with Android SDK build-tools too) apksigner sign --ks my-release-key.jks --out android-release.apk android-release-unsigned-aligned.apk
- Configure the default server, if-required:
Attachments (1)
-
.jshintrc
(384 bytes
) - added by 7 years ago.
jshintrc
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.