Android App Development¶
Requirements
- Android Studio
- Oracle Java JDK 1.7
- Git
Instructions
- Install JDK
- Install Git
- Checkout faims-android repo
Make sure you use the correct branch you are developing/testing for. - Install android studio
- Configure android studio to work with git (File > Settings.. > Version Control > Git > Path to Git executable)
- Configure the sdk manager (Tools > Android > SDK Manager > Launch Standalone SDK Manager). Install everything except the system images and preview sdk's
- Turn off instant run (F[ile > Settings > Build, execution, deployment > Instant run > untick the top checkbox])
- Create project from existing faims-android repo
- Configure
keystore.properties
for apk signing - Run a gradle sync (Tools > Android > Sync project with gradle files)
- Run a Clean (Build > Clean Project)
- Run a Build (Build > Rebuild Project Project)
Build App
- Connect android device via USB
- Make sure android device has USB Debugging enabled
- Right-Click faims-android-app and select Run
Run Tests
- Right-Click the test module in ./faimsandroidapp/src/androidTest/java/au/org/intersect/faims/android/test you which to use and select Run
Build a community apk
- Setup a faims server with your community module
- Run packageModule.rb with options for your community module and server
- Run a gradle sync (Tools > Android > Sync project with gradle files)
- Run a Clean (Build > Clean Project)
- Run a Build (Build > Rebuild Project Project)
- Run Build APK or Generate Signed APK (Build > Build APK or Generate Signed APK)
Web App Development¶
Requirements
- Installing Spatialite on Ubuntu
- Installing Spatialite Tools on Ubuntu
- Installing GDAL Tools
- You will need to have RVM installed on your system.
curl -L https://get.rvm.io | bash -s stable --ruby
You should check for rvm requirements and install them!
Install Server
- Install Server
rvm install ruby-1.9.3-p286
rvm use 1.9.3-p286@faims --create
gem install bundler
git clone git@github.com:IntersectAustralia/faims-web.git
cd faims-web
bundle install
- Setup and Start Server
cd faims-web
rake db:drop db:create db:migrate db:seed projects:setup projects:clean db:test:prepare
foreman start
- For more server usage commands follow the Developer Setup guide.
Troubleshooting
This is no longer relevant as Unicorn is used as the dev and production server.
- If webrick seems to be taking way to long to serve documents try editing its config (and if you use rvm that will be somewhere that looks like ~/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/config.rb) and change the DoNotReverseLookup value from nil to true.