added http intent (fix for #473)
This commit is contained in:
parent
2184bfd0f6
commit
48ee3ab008
@ -30,6 +30,7 @@
|
|||||||
<category android:name="android.intent.category.DEFAULT"/>
|
<category android:name="android.intent.category.DEFAULT"/>
|
||||||
<category android:name="android.intent.category.BROWSABLE"/>
|
<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="https" android:pathPrefix="/intel"></data>
|
||||||
|
<data android:host="www.ingress.com" android:scheme="http" android:pathPrefix="/intel"></data>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
@ -39,6 +39,9 @@ public class IITC_Mobile extends Activity {
|
|||||||
if (Intent.ACTION_VIEW.equals(action)) {
|
if (Intent.ACTION_VIEW.equals(action)) {
|
||||||
Uri uri = intent.getData();
|
Uri uri = intent.getData();
|
||||||
String url = uri.toString();
|
String url = uri.toString();
|
||||||
|
// TODO Why does "if(intent.getScheme() == "http")" not work?
|
||||||
|
if (url.contains("http://"))
|
||||||
|
url = url.replace("http://", "https://");
|
||||||
Log.d("Intent received", "url: " + url);
|
Log.d("Intent received", "url: " + url);
|
||||||
if (url.contains("ingress.com")) {
|
if (url.contains("ingress.com")) {
|
||||||
Log.d("Intent received", "loading url...");
|
Log.d("Intent received", "loading url...");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user