79315415

Date: 2024-12-29 10:42:50
Score: 0.5
Natty:
Report link

app_links: ^6.3.2

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.INTERNET"/>
    <application>
        <activity>
            <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" android:host="medexsepeti.com" android:pathPrefix="/" />
                <data android:scheme="https" android:host="medexsepeti.com" android:pathPrefix="/" />
            </intent-filter>
        </activity>
    </application>
</manifest>
class DeepLinkConfiguration {
  DeepLinkConfiguration();
  final appLinks = AppLinks();
  StreamSubscription<Uri>? sub;
  void initDeepLinkListener(context) async {
    sub = appLinks.uriLinkStream.listen((uri) async {
      await Future.delayed(Duration(seconds: 4));
      _handleDeepLink(uri,context);
    });
  }

  Future<void> _handleDeepLink(uri,context) async {
    final productId = uri.pathSegments.last;
    // Code to redirect
  }

ON MAIN INIT STATE

@override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      _deepLinkConfiguration = DeepLinkConfiguration();
      _deepLinkConfiguration.initDeepLinkListener(context);
    });
  }

But remember you can only test deep link if you build your app with release mode, and if you publish it on playstore add playstore SHA-1

on

enter image description here

may be available on

https://www.medexsepeti.com/.well-known/assetlinks.json

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Hemedi Manyinja