Merge branch 'master' of https://github.com/jonatkins/ingress-intel-total-conversion
This commit is contained in:
commit
86dab0384c
4
mobile/.idea/copyright/profiles_settings.xml
generated
4
mobile/.idea/copyright/profiles_settings.xml
generated
@ -1,5 +1,3 @@
|
|||||||
<component name="CopyrightManager">
|
<component name="CopyrightManager">
|
||||||
<settings default="">
|
<settings default="" />
|
||||||
<module2copyright />
|
|
||||||
</settings>
|
|
||||||
</component>
|
</component>
|
@ -1,9 +1,8 @@
|
|||||||
How does this basically work?
|
How does this basically work?
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
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").
|
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.
|
||||||
|
Communication from app to script is handled by loading Javascript function calls. For example: ```iitc_view.loadUrl("javascript: window.alert('foo');");```
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
ingress intel total conversion mobile (IITCM)
|
ingress intel total conversion mobile (IITCm)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
- it should be much faster than the standard mobile ingress intel map
|
- it should be much faster than the standard mobile ingress intel map
|
||||||
|
|
||||||
- plugin support
|
- supports all official IITC plugins
|
||||||
|
|
||||||
|
- easy installation of unofficial plugins (installation via plugin preference, click on *.user.js file or URL, email attachement etc.)
|
||||||
|
|
||||||
- show users current location
|
- show users current location
|
||||||
|
|
||||||
@ -13,17 +15,13 @@ The Android App behaves like the desktop version, but uses the mobile view, whic
|
|||||||
|
|
||||||
- a geolocate button (you have to enable GPS satellites + location access to use this feature)
|
- a geolocate button (you have to enable GPS satellites + location access to use this feature)
|
||||||
|
|
||||||
- possibility to use a custom IITC script source
|
|
||||||
|
|
||||||
- a click on Portal link copies it to clipboard
|
|
||||||
|
|
||||||
- in-app layer chooser
|
|
||||||
|
|
||||||
- in-app IITC buttons
|
|
||||||
|
|
||||||
- in-app search
|
- in-app search
|
||||||
|
|
||||||
- support for unofficial plugins. Just copy the *.user.js files to ```<storage_path>/IITC_Mobile/plugins/``` and they should appear at the top of the plugin list. Note: For every option a new persistent database entry is created. If you want to remove a plugin from your external storage you want to ensure that it is disabled in the settings, otherwise IITCM will always try to load it on start-up. If you messed this up you can wipe app data or add the plugin back to storage, disable it and remove it. Another option would be: Do nothing...it should work even so.
|
- configurable fullscreen modes (includes immersive mode on Android 4.4+)
|
||||||
|
|
||||||
|
- navigation drawers for IITC views, layer chooser and highlighters
|
||||||
|
|
||||||
|
- in-app screenshots
|
||||||
|
|
||||||
- developer mode: all script source will be loaded from ```<storage_path>/IITC_Mobile/dev/```
|
- developer mode: all script source will be loaded from ```<storage_path>/IITC_Mobile/dev/```
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import java.io.ByteArrayInputStream;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
public class IITC_WebViewClient extends WebViewClient {
|
public class IITC_WebViewClient extends WebViewClient {
|
||||||
|
|
||||||
@ -57,11 +58,9 @@ public class IITC_WebViewClient extends WebViewClient {
|
|||||||
private void loadScripts(final IITC_WebView view) {
|
private void loadScripts(final IITC_WebView view) {
|
||||||
final List<String> scripts = new LinkedList<String>();
|
final List<String> scripts = new LinkedList<String>();
|
||||||
|
|
||||||
scripts.add("script" + DOMAIN + "/total-conversion-build.user.js");
|
|
||||||
|
|
||||||
// get the plugin preferences
|
// get the plugin preferences
|
||||||
final SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(mIitc);
|
final SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(mIitc);
|
||||||
final Map<String, ?> all_prefs = sharedPref.getAll();
|
final TreeMap<String, ?> all_prefs = new TreeMap<String, Object>(sharedPref.getAll());
|
||||||
|
|
||||||
// iterate through all plugins
|
// iterate through all plugins
|
||||||
for (final Map.Entry<String, ?> entry : all_prefs.entrySet()) {
|
for (final Map.Entry<String, ?> entry : all_prefs.entrySet()) {
|
||||||
@ -80,6 +79,8 @@ public class IITC_WebViewClient extends WebViewClient {
|
|||||||
scripts.add("script" + DOMAIN + "/user-location.user.js");
|
scripts.add("script" + DOMAIN + "/user-location.user.js");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scripts.add("script" + DOMAIN + "/total-conversion-build.user.js");
|
||||||
|
|
||||||
final String js = "(function(){['" + TextUtils.join("','", scripts) + "'].forEach(function(src) {" +
|
final String js = "(function(){['" + TextUtils.join("','", scripts) + "'].forEach(function(src) {" +
|
||||||
"var script = document.createElement('script');script.src = '//'+src;" +
|
"var script = document.createElement('script');script.src = '//'+src;" +
|
||||||
"(document.body || document.head || document.documentElement).appendChild(script);" +
|
"(document.body || document.head || document.documentElement).appendChild(script);" +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user