-
Notifications
You must be signed in to change notification settings - Fork 549
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
Fix: API 30+ fix for opening Pinpoint push notification links #2924
Conversation
pinpointContext.getApplicationContext().startActivity(intent); | ||
} catch (ActivityNotFoundException e) { | ||
log.error("Couldn't find an app to open ACTION_VIEW Intent."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we include e
or e.getMessage
for additional context on error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, but it won't really provide any additional context. In this instance the only scenario here is that the user does not have a browser app installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except minor question.
Description of changes:
Android 30+ no longer allows you to query packages without adding a query tag in the manifest. Rather than add that tag, a more simple approach is to go ahead and try to start an activity and catch the exception.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.