Closed cabaird closed 4 years ago
Hi, You can do something like the following:
window.plugins.intentShim.sendResult(
{
extras: {
'Test Intent Bundle': {
'ImAnInt': 5
}
}
},
function() { }
);
@darryncampbell
Hi, You can do something like the following:
window.plugins.intentShim.sendResult( { extras: { 'Test Intent Bundle': { 'ImAnInt': 5 } } }, function() { } );
By this you mean, if the value is in a bundle, it will be sent as an int correctly?
Hi, yes, with the current implementation you can send either a string extra or a bundle extra back to the calling app. In the bundle extra you can include ints or bools. Is that sufficient or do you need to be able to send ints / bools that are not in a bundle?
I do see that ints and booleans are working as expected as extras when using the startActivity
and startActivityForResult
methods. I would think we'd want these to be consistent ultimately.
As a temporary solution, we can make it work, but ideally, we'd like to send int and boolean extras. We're trying to use this for a dynamic solution, so a fix for this would allow for more options on our end.
OK, thanks for the feedback. I have marked this as todo.
Addressed in 1.1.5
Currently, when calling sendResult, any extras that are sent in are sent as strings. We'd like to be able to send these as booleans and ints as well. I believe a similar issue was fixed for startActivity, in #41.