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

Restrict NewDot deep/universal links to specific paths on Android #6068

Merged
merged 6 commits into from
Oct 28, 2021
Merged
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
46 changes: 28 additions & 18 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">

<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand All @@ -31,45 +32,54 @@
android:exported="true"
android:windowSoftInputMode="adjustResize">
</activity>

<activity
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
android:theme="@style/BootTheme"
android:launchMode="singleTask">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<!-- Custom URI handlers. Used to intercept Urban Airship deep links. -->
Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering if we could remove the expensify-cash scheme here, but looks like that's going to be handled in https://github.com/Expensify/Expensify/issues/176081 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good spot. I was going to do this separately. Thanks for the existing issue link!

<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="expensify-cash"/>
</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"/>
Comment on lines -47 to -51
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We only need one intent filter for each scheme.

<data android:scheme="new-expensify"/>
</intent-filter>

<!-- Web URL handlers. Used to intercept web links. -->
<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="https" android:host="new.expensify.com" />
</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:scheme="https" android:host="staging.new.expensify.com" />
</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:scheme="https" android:host="staging.new.expensify.com" />

<!-- Production URLs -->
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/r"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/settings"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/setpassword"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/details"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/v"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/bank-account"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/iou"/>
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/enable-payments"/>

<!-- Staging URLs -->
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/r"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/settings"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/setpassword"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/details"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/v"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/bank-account"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/iou"/>
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/enable-payments"/>
</intent-filter>
</activity>

<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />

<meta-data android:name="com.urbanairship.reactnative.AIRSHIP_EXTENDER"
Expand Down