@@ -7,7 +7,7 @@ let lastReceivedData = null;
77
88export function handleIntent ( intent : any ) {
99 let data = intent . getData ( ) ;
10- if ( data !== lastReceivedData ) {
10+ if ( data . toString ( ) !== lastReceivedData . toString ( ) ) {
1111 try {
1212 if ( new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
1313 application . android . on ( application . AndroidApplication . activityResultEvent , ( eventData ) => {
@@ -22,29 +22,24 @@ export function handleIntent(intent: any) {
2222 }
2323}
2424application . android . on ( application . AndroidApplication . activityCreatedEvent , ( args ) => {
25- let intent : android . content . Intent = args . activity . getIntent ( ) ,
26- data = intent . getData ( ) ;
27- if ( data !== lastReceivedData ) {
28- try {
29- if ( new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
30- handleIntent ( intent ) ;
31- }
32- } catch ( e ) {
33- console . error ( 'Unknown error during getting App URL data' , e ) ;
25+ let intent : android . content . Intent = args . activity . getIntent ( ) ;
26+ try {
27+ if ( new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
28+ handleIntent ( intent ) ;
3429 }
30+ } catch ( e ) {
31+ console . error ( 'Unknown error during getting App URL data' , e ) ;
3532 }
33+
3634} ) ;
3735application . android . on ( application . AndroidApplication . activityResumedEvent , ( args ) => {
38- let intent : android . content . Intent = args . activity . getIntent ( ) ,
39- data = intent . getData ( ) ;
40- if ( data !== lastReceivedData ) {
41- try {
42- if ( new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
43- handleIntent ( intent ) ;
44- lastReceivedData = data ;
45- }
46- } catch ( e ) {
47- console . error ( 'Unknown error during getting App URL data' , e ) ;
36+ let intent : android . content . Intent = args . activity . getIntent ( ) ;
37+ try {
38+ if ( new String ( intent . getAction ( ) ) . valueOf ( ) === new String ( android . content . Intent . ACTION_VIEW ) . valueOf ( ) ) {
39+ handleIntent ( intent ) ;
40+ lastReceivedData = intent . getData ( ) ;
4841 }
42+ } catch ( e ) {
43+ console . error ( 'Unknown error during getting App URL data' , e ) ;
4944 }
5045} ) ;
0 commit comments