Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: fix some Intent filters #621

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions mobile/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,25 @@
<!-- Handles the implicit intent to VIEW the intel.ingress.com/ URI -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required for NFC to work? I don't have the proper device to test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm playing around trying to figure why some apps are fine with urls, and why iitc isn't


<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="intel.ingress.com"/>
<data android:scheme="http" android:host="intel.ingress.com"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I remember, it follows from the documentation that the previous version also works

<data android:scheme="https" android:host="intel.ingress.com"/>
</intent-filter>

<!-- Handles the implicit intent to VIEW legacy [www.]ingress.com/intel URI -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="ingress.com"/>
<data android:host="www.ingress.com"/>
<data android:pathPrefix="/intel"/>
<data android:scheme="http" android:host="ingress.com" android:pathPrefix="/intel"/>
<data android:scheme="https" android:host="ingress.com" android:pathPrefix="/intel"/>
<data android:scheme="http" android:host="www.ingress.com" android:pathPrefix="/intel"/>
<data android:scheme="https" android:host="www.ingress.com" android:pathPrefix="/intel"/>
</intent-filter>

<!-- Handles geo: URIs -->
Expand All @@ -78,6 +74,16 @@
<data android:scheme="geo"/>
</intent-filter>

<!-- Handles iitc: URIs -->
<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:scheme="iitc"/>
</intent-filter>

<!-- Points to searchable meta data. -->
<meta-data
android:name="android.app.searchable"
Expand Down Expand Up @@ -115,9 +121,8 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="*" android:pathPattern=".*\\.user.js"/>
<data android:scheme="http" android:pathPattern=".*\\.user\\.js"/>
<data android:scheme="https" android:pathPattern=".*\\.user\\.js"/>
</intent-filter>
</activity>

Expand Down