Merge branch 'master' into androidstudio
This commit is contained in:
commit
50168e93fa
@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.cradle.iitc_mobile"
|
||||
android:versionCode="21"
|
||||
android:versionName="0.4.0" >
|
||||
package="com.cradle.iitc_mobile"
|
||||
android:versionCode="22"
|
||||
android:versionName="0.4.1">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="17" />
|
||||
android:targetSdkVersion="17"/>
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@ -24,25 +24,57 @@
|
||||
android:name="com.cradle.iitc_mobile.IITC_Mobile"
|
||||
android:theme="@style/AppBaseTheme"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize" >
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:host="www.ingress.com" android:scheme="https" android:pathPrefix="/intel"></data>
|
||||
<data android:host="www.ingress.com" android:scheme="http" android:pathPrefix="/intel"></data>
|
||||
|
||||
<data
|
||||
android:host="www.ingress.com"
|
||||
android:scheme="https"
|
||||
android:pathPrefix="/intel"></data>
|
||||
<data
|
||||
android:host="www.ingress.com"
|
||||
android:scheme="http"
|
||||
android:pathPrefix="/intel"></data>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.cradle.iitc_mobile.IITC_Settings"
|
||||
android:theme="@style/AppBaseTheme"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize" >
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
|
||||
</activity>
|
||||
|
||||
<uses-library
|
||||
android:name="com.sec.android.app.multiwindow"
|
||||
android:required="false"/>
|
||||
|
||||
<meta-data
|
||||
android:name="com.sec.android.support.multiwindow"
|
||||
android:value="true"/>
|
||||
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
|
||||
android:resource="@dimen/app_defaultsize_w"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
|
||||
android:resource="@dimen/app_defaultsize_h"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
|
||||
android:resource="@dimen/app_minimumsize_w"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
|
||||
android:resource="@dimen/app_minimumsize_h"/>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
@ -3,5 +3,9 @@
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="app_defaultsize_w">640dip</dimen>
|
||||
<dimen name="app_defaultsize_h">400dip</dimen>
|
||||
<dimen name="app_minimumsize_w">400dip</dimen>
|
||||
<dimen name="app_minimumsize_h">200dip</dimen>
|
||||
|
||||
</resources>
|
@ -153,7 +153,7 @@ public class IITC_DeviceAccountLogin implements AccountManagerCallback<Bundle> {
|
||||
if (result != null) {
|
||||
// authentication succeded, we can load the given url, which will redirect back to the intel map
|
||||
mWebView.loadUrl(result);
|
||||
mActivity.loginSucceded();
|
||||
mActivity.loginSucceeded();
|
||||
} else {
|
||||
onLoginFailed();
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ public class IITC_Mobile extends Activity {
|
||||
/**
|
||||
* called after successful login
|
||||
*/
|
||||
public void loginSucceded() {
|
||||
public void loginSucceeded() {
|
||||
// garbage collection
|
||||
mLogin = null;
|
||||
}
|
||||
|
102
plugins/basemap-cloudmade.user.js
Executable file
102
plugins/basemap-cloudmade.user.js
Executable file
@ -0,0 +1,102 @@
|
||||
//******************************
|
||||
//******************************
|
||||
//******** INSTRUCTIONS ********
|
||||
//******************************
|
||||
//******************************
|
||||
|
||||
// 1. Go to the www.cloudmade.com website and register an account
|
||||
// 2. Get an API Key
|
||||
// 3. Edit the clode below, replace YOUR_API_KEY with the API key from CloudMade.com
|
||||
// 4. Reload the page
|
||||
// optional: browse their map styles, add/modify any you like to the cmStyles list
|
||||
|
||||
// You take your own responsibility for any API key you register and use. Please read
|
||||
// any relevant terms and conditions. At the time of writing, Cloudmade offer a reasonable
|
||||
// number of free requests, which should be more than enough for personal use. You could
|
||||
// probably share a key with a group of people without issues, but it is your responsibility
|
||||
// to remain within any terms and usage limits.
|
||||
|
||||
//******************************
|
||||
//******************************
|
||||
//******************************
|
||||
|
||||
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-cloudmade-maps
|
||||
// @name IITC plugin: CloudMade.com maps
|
||||
// @version 0.0.1
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @description TEMPLATE PLUGIN - add back the CloudMade.com map layers. YOU WILL NEED TO EDIT THIS PLUGIN BEFORE IT WILL RUN
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
// @match http://www.ingress.com/intel*
|
||||
// ==/UserScript==
|
||||
|
||||
function wrapper() {
|
||||
// ensure plugin framework is there, even if iitc is not yet loaded
|
||||
if(typeof window.plugin !== 'function') window.plugin = function() {};
|
||||
|
||||
|
||||
// PLUGIN START ////////////////////////////////////////////////////////
|
||||
|
||||
window.plugin.mapTileCloudMade = function() {};
|
||||
|
||||
window.plugin.mapTileCloudMade.setup = function() {
|
||||
//**********************************
|
||||
//**********************************
|
||||
//**** CloudMade settings start ****
|
||||
//**********************************
|
||||
//**********************************
|
||||
|
||||
//set this to your API key - get an API key by registering at www.cloudmade.com
|
||||
//e.g. var cmApiKey = '8ee2a50541944fb9bcedded5165f09d9';
|
||||
var cmApiKey = 'YOUR_API_KEY';
|
||||
|
||||
//the list of styles you'd like to see
|
||||
var cmStyles = {
|
||||
'999': "Midnight",
|
||||
'22677': "Minimal",
|
||||
'78603': "Armageddon",
|
||||
};
|
||||
|
||||
//**********************************
|
||||
//**********************************
|
||||
//**** CloudMade settings end ****
|
||||
//**********************************
|
||||
//**********************************
|
||||
|
||||
|
||||
if(cmApiKey=='YOUR_API_KEY') {
|
||||
dialog({title: 'CloudMade.com map plugin', text: 'The CloudMade.com plugin needs manual configuration. Edit the plugin code to do this.'});
|
||||
return;
|
||||
}
|
||||
|
||||
var osmAttribution = 'Map data © OpenStreetMap contributors';
|
||||
var cmOpt = {attribution: osmAttribution+', Imagery © CloudMade', maxZoom: 18, apikey: cmApiKey};
|
||||
|
||||
$.each(cmStyles, function(key,value) {
|
||||
cmOpt['style'] = key;
|
||||
var cmMap = new L.TileLayer('http://{s}.tile.cloudmade.com/{apikey}/{style}/256/{z}/{x}/{y}.png', cmOpt);
|
||||
layerChooser.addBaseLayer(cmMap, 'CloudMade '+value);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var setup = window.plugin.mapTileCloudMade.setup;
|
||||
|
||||
// PLUGIN END //////////////////////////////////////////////////////////
|
||||
|
||||
if(window.iitcLoaded && typeof setup === 'function') {
|
||||
setup();
|
||||
} else {
|
||||
if(window.bootPlugins)
|
||||
window.bootPlugins.push(setup);
|
||||
else
|
||||
window.bootPlugins = [setup];
|
||||
}
|
||||
} // wrapper end
|
||||
// inject code into site context
|
||||
var script = document.createElement('script');
|
||||
script.appendChild(document.createTextNode('('+ wrapper +')();'));
|
||||
(document.body || document.head || document.documentElement).appendChild(script);
|
Loading…
x
Reference in New Issue
Block a user