We have two Android applications: one implemented using native Java and another written using Ionic. The Ionic app launches my app which is the Android app using the lampaa plugin. I could receive the extras that the Ionic app provides using the following code:
String keyid = getIntent().getStringExtra("keyid");
Before I exit my app, I would like to send extras to the Ionic app. This is easily done from the Android side. How does the Ionic app know that my application has transferred control to it and how can it retrieve the extras that I have sent?
I think in your case to get extras from your native app you need to use other plugin like cordova-plugin-intent.
For example :
//To get the intent and extras when the app it's open for the first time
window.plugins.intent.getCordovaIntent (function (intent) {
intenthandler(intent);
});
//To get the intent and extras if the app is running in the background
window.plugins.intent.setNewIntentHandler (function (intent) {
intenthandler(intent);
});
//To handle the params
var intenthandler = function (intent) {
if (intent && intent.extras && intent.extras.myParams) {
//Do something
}
};
For more help check to here.
Hopes this will help you!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With