javascript - cordova onNewIntent not firing -


in cordova application, using following code receive new intent:

window.plugins.webintent.onnewintent(function(url) {   if(url !== "") {     window.alert("new intent received");   } }); 

my android launch mode set singleinstance launch mode, have tried singlelaunch:

 <preference name="androidlaunchmode" value="singleinstance" /> 

further, have configured appropriate xml in androidmanifest.xml file app launched when mime type of ".abcd" opened.

what happens follows: go gmail application , launch application .abcd attachment file. move app background, , navigate gmail application , try launching different .abcd file again. cordova application not register onnewintent. but, if return gmail application , try again, onnewintent fired. basically, onnewintent fired every second time, alternating between firing , not firing.

further, if move cordova application background, return cordova application foreground, navigate gmail application , try launching .abcd attachment file, onnewintent fires. essentially, seems if cordova application needs go background mode, resumed, , go background mode register onnewintent....any suggestions on how fix onnewintent fired each time app launched gmail application?


Comments