This commit is contained in:
Jon Atkins 2013-04-16 23:54:05 +01:00
commit bec7ae8c95
2 changed files with 26 additions and 11 deletions

View File

@ -1,7 +1,11 @@
How does this basically work? How does this basically work?
----------------------------- -----------------------------
At the moment, the Android App is nothing more then a WebView which renders the normal web page. The IITC script is injected on page load and after this, it works the same way as on desktop browser. More functionality will be added soon... At the moment, the Android App is a WebView which renders the normal web page. The IITC script is injected by calling ```iitc_view.loadIITC_JS(Context)```. The app uses a local version of the script, which is located in the assets folder, if no external source is given (see "pref\_iitc\_source").
Communication from app to script is handled by loading Javascript function calls. For example: ```iitc_view.loadUrl("javascript: window.goBack();");```
Communication from script to app is handled by the JavascriptInterface (see /mobile/src/com/cradle/iitc\_mobile/IITC_JSInterface.java). If a method ```foo(String)``` is defined in JSInterface, it can be called by ```android.foo("Hello World")``` in the IITC script.
Debugging Debugging
--------- ---------
@ -16,13 +20,8 @@ Debugging IITC(M) **before** it has booted requires the Android Developer Tools.
Building the APK Building the APK
---------------- ----------------
- **Eclipse:** Just import this project and klick the build button.
- **ant:** - **ant:**
Set the ANDROID_HOME environment variable: Set the ANDROID_HOME environment variable:
```export ANDROID_HOME=/path/to/android_sdk``` ```export ANDROID_HOME=/path/to/android_sdk```
and build the project with ant: Then build the app via the build.py script ```./build.py mobile```
`ant debug` - **Eclipse:** Just import this project and klick the build button. Ensure that you have iitc.js in your assets folder. This is automatically created, when executing ```./build.py mobile```. Otherwise, just copy the IITC script to the assets folder and rename it to iitc.js
- You can use `build_mobile.js`, too, which builds IITC, compresses
it and uses ant to build a release APK of IITCM. It requires that
you have Python and uglifyjs installed. You need to set the
`ANDROID_HOME`, like explained above.

View File

@ -1,6 +1,22 @@
ingress intel total conversion (IITC) ingress intel total conversion mobile (IITCM)
===================================== =====================================
# [User documentation moved to the wiki. Please see there!](https://github.com/breunigs/ingress-intel-total-conversion/wiki/IITC-Mobile) The Android App behaves like the desktop version, but uses the mobile view, which is optimized for mobile devices, as default. Furthermore, there are some nice additions:
### [For developer docs, please see HACKING.md](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/mobile/HACKING.md) - it should be much faster than the standard mobile ingress intel map
- a gmaps intent is sent, when a portals Map link is clicked (lets you navigate to portals)
- a geolocate button (you have to enable GPS satellites + location access to use this feature)
- toggle between desktop and mobile view (nice for tablets)
- possibility to use a custom IITC script source
- a click on Portal link copies it to clipboard
- more features will be added soon...
**The App only works with Android 4.0+**
### [For developer docs, please see HACKING.md](https://github.com/jonatkins/ingress-intel-total-conversion/blob/master/mobile/HACKING.md)