mWater / mWater-Android-App

An Android App that snaps a picture of a petrifilm, counts the bacteria and posts the counts on a server for the mWater project
https://github.com/AndroidImageProcessing
GNU General Public License v3.0
24 stars 16 forks source link

Source code for recent versions #79

Open dalb8 opened 10 years ago

dalb8 commented 10 years ago

This repo hasn't been updated in a while; where should I go to get the source code for the recent Android releases? I just want to install the app on my phone but I don't understand the Cordova stuff too well.

grassick commented 10 years ago

https://github.com/mWater/app-v3 is now the current app. I've updated the readmes to reflect this.

To install it on your phone, it is in Google Play (mWater app) or go to http://app.mwater.co (for the web version).

To install a debug version, run grunt run_cordova_debug there. Let me know if you have any further problems!

dalb8 commented 10 years ago

I got as far as Loading "Gruntfile.js" tasks...ERROR

Error: Cannot find module 'browserify' Warning: Task "run_cordova_debug" not found. Use --force to continue.

I installed browserify and grunt-browserify.

Edit: I did npm link and installed a few more things , now I'm stuck at Error: Cannot find module './source-map/source-map-generator'. I think it's because of unmet dependencies I got when installing some packages.

grassick commented 10 years ago

For the app, you shouldn't need to do npm link.. Did you do an npm install successfully?

dalb8 commented 10 years ago

Thanks for the hint! I simply ran npm install and that seemed to grab all dependencies without problems. I have the web app running and am now figuring out how to get the apk. Easy when you know how!

dalb8 commented 10 years ago

I only just tackled getting a recent version of npm and I have no experience with it. I just deleted the node_modules dir. I have broeserify, cordova, grunt in ~/npm/bin yet it cannot find module Browserify.

dalb8 commented 10 years ago

So if I have it right, install recent version of npm, install grunt, grunt-cli, browserify and cordova , run npm install; grunt --save-dev; npm install; ./setup-cordova.sh; ./build-cordova-release.sh

Also I had to delete platforms/android/custom_rules.xml and change the version in the Manifest. I can't find the version code anywhere.

grassick commented 10 years ago

I'm surprised that you need to run run npm install grunt. It should be installed with npm install. I'll update the docs in the Readme.

Building a release isn't necessary (as it will ask you for the release keys). Does grunt run_cordova_debug work for you?

dalb8 commented 10 years ago

Perhaps you're right about installing grunt.

grunt run_cordova_debug works fine too, except the run command didn't finish: WARNING : No target specified, deploying to device '037c61c1417fb417'. Command finished with error code 2: /home/gerry/build/co.mwater.clientapp/cordova/platforms/android/cordova/run

I'm not much of a coder, so I prefer to install apps with release keys; I use the fdroidserver system which can sign all apks in a simple manner.

I'd suggest some Android related info to the README, because people who aren't familar with Cordova might not realise there's an Android app there. So these steps are necessary at lease with release: ./setup_cordova.sh && \ sed -i 's/3.0.40/3.2.16/' app/cordova/release/config.xml && \ sed -i "s/'0.0.1'/'3.2.16'/;s/'1'/'3216'/" cordova/platforms/android/AndroidManifest.xml && \ rm cordova/platforms/android/custom_rules.xml cordova/platforms/android/ant.properties && \ echo y | ./build_cordova_release.sh

dalb8 commented 10 years ago

In run_cordova_debug the default target is run, but not in cordova_release. That seems to cause the index.html to not be in the APK.