llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
176 stars 68 forks source link

Tap Notification and Open Deep Link URL #48

Closed cliftonlabrum closed 1 year ago

cliftonlabrum commented 1 year ago

Thanks for an awesome plugin! 😄

I have app_links installed and working. When I do the following command in the Terminal, it correctly opens my Flutter app to the correct go_router route:

xcrun simctl openurl booted "myapp://tools" 

But what I don't get is how to make it so when I tap on a push notification for my app, it reads the url property of my notification payload so that it goes to that URL:

'aps': {
  'alert': {
    'title': title,
    'body': message,
  },
  'sound': 'PopDing.aiff',
  'url': 'myapp://tools',
}

As far as I can tell, when you do this with a native iOS or Mac app, you have to manually parse the url property and act on it.

Does app_links capture my notification payload somehow so I can use it to redirect to the correct page in my app?

llfbandit commented 1 year ago

Absolutely not. Maybe you can fire it with url_launcher to trigger the link.