0

I've got a flutter app served for web at somedomain/somepath/. I get it to work correctly for web by setting --base-href=/somepath/ when building it. This way, I can open links to the app that have this url structure somedomain/somepath/#/someroute and go_router opens the correct route (someroute).

However, if I want to use deep linking for the android version and be able to open the same links, I cannot find the way in the android manifest to tell it to ignore the somepath part so go_router receives the someroute part.

I have read this and tried both path and pathPrefix from here: <data android:path="/somepath/#/"/> with no luck. I cannot find anything related to this in the documentation.

I do achieve the correct navigation using deep links when I don't use the /somepath/#/ part. That is, by clicking on a link like somedomain/someroute, the android app opens at the correct screen.

The modified part in android manifest is this:

<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
<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="http" />
                <data android:scheme="https" />

                <data android:host="somedomain" />
</intent-filter>
raquelhortab
  • 430
  • 4
  • 13

0 Answers0