Skip to content

Fix Deep Links not working on Android 12+ #10128

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

Merged
merged 20 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6a1741f
feat: upgrading targetSdkVersion
tomivs Jul 27, 2022
0d21e9e
feat: updating npm pkgs for new targetSdkVersion
tomivs Jul 27, 2022
33ef541
feat: android:exported for activities
tomivs Jul 27, 2022
b1ccedf
chore: adds assetlinks.json for link verification
tomivs Jul 27, 2022
e55f74d
chore: webpack config to deploy assetlinks.json
tomivs Jul 27, 2022
921bf0c
fix: removing old Swift reference
tomivs Aug 4, 2022
fa5ccf8
fix: removing old Swift reference 2
tomivs Aug 4, 2022
15f6dc4
feat: updating to [email protected]
tomivs Aug 4, 2022
93e92b1
Revert "feat: upgrading targetSdkVersion"
tomivs Aug 11, 2022
f5ecc63
Revert "feat: updating npm pkgs for new targetSdkVersion"
tomivs Aug 11, 2022
c0844c0
Revert "feat: android:exported for activities"
tomivs Aug 11, 2022
01b905e
Revert "fix: removing old Swift reference"
tomivs Aug 11, 2022
2fb9853
Revert "fix: removing old Swift reference 2"
tomivs Aug 11, 2022
99b0890
Revert "feat: updating to [email protected]"
tomivs Aug 11, 2022
c8aa9fa
Revert "feat: updating npm pkgs for new targetSdkVersion"
tomivs Aug 11, 2022
9904c07
Merge branch 'Expensify:main' into tomivs-deep-links-android-12
tomivs Aug 11, 2022
6399644
fix: set up AndroidManifest.xml for Android 12+
tomivs Aug 11, 2022
695862c
Merge branch 'Expensify:main' into tomivs-deep-links-android-12
tomivs Aug 11, 2022
1b4fa01
Merge branch 'Expensify:main' into tomivs-deep-links-android-12
tomivs Aug 11, 2022
3e01ca4
Merge branch 'Expensify:main' into tomivs-deep-links-android-12
tomivs Aug 12, 2022
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
8 changes: 8 additions & 0 deletions .well-known/assetlinks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.expensify.chat",
"sha256_cert_fingerprints": ["2E:65:6F:1C:34:F5:7E:BF:FC:C0:2D:A3:14:0E:83:FE:61:51:F2:9B:5D:59:58:61:C4:4D:A9:99:0C:CA:F4:8E"]
Copy link
Member

@parasharrajat parasharrajat Jul 27, 2022

Choose a reason for hiding this comment

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

Is this correct? Or we have to change it. The gpg key in the codebase is encrypted if you used that to get the signature.

Copy link
Contributor Author

@tomivs tomivs Jul 27, 2022

Choose a reason for hiding this comment

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

I extracted it from the New Expensify's APK from the Play Store, so it should probably work.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@AndrewGable might be a bit slow to respond this week… He's getting married 😅 💍

Copy link
Member

Choose a reason for hiding this comment

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

Awesome, definitely he won't be able to respond. In that case, @deetergp Could you please check the signature? https://developer.android.com/training/app-links/verify-site-associations#web-assoc has details to get the signature.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.. Please let's double check this..

Copy link
Contributor

Choose a reason for hiding this comment

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

Verified in Google Play store and it is correct!
Screen Shot 2022-08-03 at 1 02 00 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @luacmartins

}
}]
8 changes: 4 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@
<activity
android:name=".bootsplash.BootSplashActivity"
android:theme="@style/BootTheme"
android:exported="false"
android:exported="true"
android:launchMode="singleTask">

<intent-filter>
<intent-filter android:autoVerify="true">
<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. -->
<intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="new-expensify"/>
</intent-filter>

<!-- Web URL handlers. Used to intercept web links. -->
<intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
Expand Down
1 change: 1 addition & 0 deletions config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
{from: 'node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css', to: 'css/AnnotationLayer.css'},
{from: 'assets/images/shadow.png', to: 'images/shadow.png'},
{from: '.well-known/apple-app-site-association', to: '.well-known/apple-app-site-association', toType: 'file'},
{from: '.well-known/assetlinks.json', to: '.well-known/assetlinks.json'},

// These files are copied over as per instructions here
// https://github.com/wojtekmaj/react-pdf#copying-cmaps
Expand Down