@@ -10,11 +10,17 @@ export function handleIntent(intent: any) {
10
10
if ( lastReceivedData === null || data . toString ( ) !== lastReceivedData . toString ( ) ) {
11
11
try {
12
12
if ( new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
13
- application . android . on ( application . AndroidApplication . activityResultEvent , ( eventData ) => {
13
+ try {
14
14
setTimeout ( ( ) => {
15
15
getCallback ( ) ( extractAppURL ( data ) ) ;
16
16
} ) ;
17
- } ) ;
17
+ } catch ( ignored ) {
18
+ application . android . on ( application . AndroidApplication . activityResultEvent , ( eventData ) => {
19
+ setTimeout ( ( ) => {
20
+ getCallback ( ) ( extractAppURL ( data ) ) ;
21
+ } ) ;
22
+ } ) ;
23
+ }
18
24
}
19
25
} catch ( e ) {
20
26
console . error ( 'Unknown error during getting App URL data' , e ) ;
@@ -25,7 +31,7 @@ application.android.on(application.AndroidApplication.activityCreatedEvent, (arg
25
31
let intent : android . content . Intent = args . activity . getIntent ( ) ;
26
32
try {
27
33
if ( new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_MAIN ) . valueOf ( )
28
- || new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
34
+ || new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
29
35
handleIntent ( intent ) ;
30
36
}
31
37
} catch ( e ) {
@@ -37,7 +43,7 @@ application.android.on(application.AndroidApplication.activityResumedEvent, (arg
37
43
let intent : android . content . Intent = args . activity . getIntent ( ) ;
38
44
try {
39
45
if ( new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_MAIN ) . valueOf ( )
40
- || new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
46
+ || new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
41
47
handleIntent ( intent ) ;
42
48
lastReceivedData = intent . getData ( ) ;
43
49
}
0 commit comments