Skip to content

Commit

Permalink
Fix launching Sharezone when using Dynamic Link on Android (#665)
Browse files Browse the repository at this point in the history
Reason for this issue was that `intent-filter` was missing.

For some reason, I also needed to add `sharezone.net` to get the Dynamic
Links working, which is a bit weird. I think `sharezone.net` is coming
from


https://github.com/SharezoneApp/backend-mono/blob/1d402c3a1817c24e04d4f781405fdcc3af350209/infrastructure/google_cloud_platform/firebase/cloud_functions/functions/src/dynamic_links/dynamic_links.ts#L14

Fixes #661
  • Loading branch information
nilsreichardt authored May 9, 2023
1 parent a8a3a25 commit 05b6009
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

<!-- Intent for receiving Firebase Dynammic Links
See:
* https://github.com/firebase/flutterfire/blob/6ae57735289cfa82322ee2259816a49cd605b784/packages/firebase_dynamic_links/firebase_dynamic_links/example/android/app/src/main/AndroidManifest.xml#L35
* https://firebase.google.com/docs/dynamic-links/android/receive#add-an-intent-filter-for-deep-links
-->
<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:host="sharez.one" android:scheme="https"/>
</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:host="sharezone.net" android:scheme="https"/>
</intent-filter>
</activity>

<provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.fileProvider" android:exported="false" android:grantUriPermissions="true" tools:replace="android:authorities">
Expand Down

0 comments on commit 05b6009

Please sign in to comment.