added http intent (fix for #473)

This commit is contained in:
leCradle 2013-03-14 09:15:00 +01:00
parent 2184bfd0f6
commit 48ee3ab008
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,7 @@
<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>
</intent-filter>
</activity>
</application>

View File

@ -39,6 +39,9 @@ public class IITC_Mobile extends Activity {
if (Intent.ACTION_VIEW.equals(action)) {
Uri uri = intent.getData();
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);
if (url.contains("ingress.com")) {
Log.d("Intent received", "loading url...");