-
Notifications
You must be signed in to change notification settings - Fork 117
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
Pinpoint notifications: Deep link doesn't work #2814
Comments
Hi @Andrew0000 , Thanks for reporting the issue, one of our team members will take a look and post updates here. |
Hi @Andrew0000 , I was not able to reproduce the issue. Have you also followed the steps in our Amplify doc and additionally followed the guide on how to enable DEEP linking in your project? Let me know if there any additional steps that I missed. Meanwhile, I'll retry to replicate your issue. |
Yes, we use deep links. It works with other notifications. As I understand, the problem happens even before this. The app is launched from the Amplify's notification with android.intent.action.MAIN action and null data in its intent. I logged the intent in my Activity's onCreate() as the earliest point before every in-app navigation. So there is just no data that the app can get a link from.
I believe so. But let me copy the code: AndroidManifest:
App:
PushNotificationService:
|
It's a little none of my business, but I'm looking at com.amplifyframework.pushnotifications.pinpoint.PushNotificationsUtils and see nothing related to any link. Where is a link supposed to be put into the Intent?
UPD: I went deeper into AWSPinpointPushNotificationsActivity -> getIntentAction -> PinpointNotificationPayload.fromNotificationPayload ->
So maybe I should use pinpoint.deeplink field in my pushes? Just a guess. |
Yes, this formatting make deeplinks work:
Could you please confirm that a consumer/developer should use pinpoint.deeplink key in the message in order to make deeplinks work? I literally see no documentation regarding pinpoint.deeplink parameter and I found it only by looking at the Amplify's source code. |
Hi @Andrew0000 , Glad that you found the solution to it. We will make sure to document these properly so that we can mitigate as many misunderstandings as possible. |
Hi @yuhengshs , Although my finding works, it would be great if someone could confirm its correctness or provide a code snippet that worked as you mentioned in the first reply. Just to make sure there are no hidden pitfalls in my finding. |
@Andrew0000 That looks correct. Amplify is coded to handle templates from using the "Standard message" with "Open a deep link" Action on the Pinpoint console. Using these parameters appears to send as "pinpoint.deeplink". If you are using the "Raw message" format, then you would still have to follow the same spec as the deep link standard message behavior. This looks like missing documentation on the Pinpoint site to clarify how the template actions translate into the resulting raw message. |
Before opening, please confirm:
Language and Async Model
Kotlin, Kotlin - Coroutines, RxJava
Amplify Categories
Notifications
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-prop-apnsmessage-action
Describe the bug
I'm trying to use deep link in my android app. Seems like Amplify doesn't support it.
What I send from web Pinpoint:
As you can see, I specified Action DEEP_LINK as it's described here: https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-prop-apnsmessage-action
Bu on the client side I receive a notification with no deep link.
It means that app gets android.intent.action.MAIN as the intent action by tap.
Intent's data is null.
I believe I've done everything correctly according:
https://docs.amplify.aws/gen1/android/build-a-backend/push-notifications/set-up-push-notifications/
https://docs.amplify.aws/gen1/android/build-a-backend/push-notifications/register-device/
https://docs.amplify.aws/gen1/android/build-a-backend/push-notifications/record-notifications/
What could be the problem?
Reproduction steps (if applicable)
Result: App is opened with no deep link. Intent: android.intent.action.MAIN, data: null
Code Snippet
// Put your code below this line.
Log output
amplifyconfiguration.json
GraphQL Schema
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: