handle share intents when app first launches (#9410)
This commit is contained in:
+4
@@ -23,6 +23,10 @@ class ExpoReceiveAndroidIntentsModule : Module() {
|
|||||||
ModuleDefinition {
|
ModuleDefinition {
|
||||||
Name("ExpoReceiveAndroidIntents")
|
Name("ExpoReceiveAndroidIntents")
|
||||||
|
|
||||||
|
OnCreate {
|
||||||
|
handleIntent(appContext.currentActivity?.intent)
|
||||||
|
}
|
||||||
|
|
||||||
OnNewIntent {
|
OnNewIntent {
|
||||||
handleIntent(it)
|
handleIntent(it)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const VALID_IMAGE_REGEX = /^[\w.:\-_/]+\|\d+(\.\d+)?\|\d+(\.\d+)?$/
|
|||||||
let previousIntentUrl = ''
|
let previousIntentUrl = ''
|
||||||
|
|
||||||
export function useIntentHandler() {
|
export function useIntentHandler() {
|
||||||
const incomingUrl = Linking.useURL()
|
const incomingUrl = Linking.useLinkingURL()
|
||||||
const composeIntent = useComposeIntent()
|
const composeIntent = useComposeIntent()
|
||||||
const verifyEmailIntent = useVerifyEmailIntent()
|
const verifyEmailIntent = useVerifyEmailIntent()
|
||||||
const ageAssuranceRedirectDialogControl =
|
const ageAssuranceRedirectDialogControl =
|
||||||
@@ -108,6 +108,7 @@ export function useIntentHandler() {
|
|||||||
} else {
|
} else {
|
||||||
tryApplyUpdate(channel)
|
tryApplyUpdate(channel)
|
||||||
}
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user