Android plugin @Override onActivityResult never gets called/invoked.
See original GitHub issueThis seems really similar to a previous issue #898
The facebook plugin https://github.com/Telerik-Verified-Plugins/Facebook is passing the current activity via cordova.getActivity() to facebook android sdk. In turn the facebook sdk is supposed to be calling the onActivityResult method on the Plugin, but it never fires.
ConnectPlugin.java line 260
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
Log.d("Never makes it here :(");
super.onActivityResult(requestCode, resultCode, intent);
Log.d(TAG, "activity result in plugin: requestCode(" + requestCode + "), resultCode(" + resultCode + ")");
callbackManager.onActivityResult(requestCode, resultCode, intent);
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
android - onActivityResult never called - Stack Overflow
I tried putting the onActivityResult function in my FriendPicker class and lo log either. I don't get it... – thomaus. Mar 14, 2011...
Read more >Getting a result from an activity - Android Developers
Note: Since your process and activity can be destroyed between when you call launch() and when the onActivityResult() callback is triggered, any ...
Read more >[Android] Add super method calls to onActivityResult overrides ...
In this case flows that involve doSomething won't work, because results from startActivityForResult will never get to super.onActivityResult.
Read more >Some questions about onActivityResult and ... - Unity Forum
Hello Folks, Just started some android plugin tests. i have a ... is never called.. ?? the static function is working (i get...
Read more >Unity Android Plugins and `onActivityResult` callback - Medium
I quickly gave up this approach as only one plugin can override Unity activity and people sometimes use multiple Android plugins.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Current if you call
startActivityForResult(CordovaPlugin, ..)
this plugin will be the receiver of the returned value. ThesetActivityResultCallback
will not be honored.To broaden the cordova support though it makes sense to allow this alternative method as well and we will update the tabris-android platform accordingly. This change will be in after the 1.9 release though.
@exocom @dested We have updated the cordova integration to properly dispatch the activity result to the plugin. Please try with the latest nightly build. This also required to updated to the latest cordova-android platform
5.2.2
which in turn requires the latest cordova-cli6.3.1
.We have actually used the
cordova-plugin-health
plugin to sign in with the google api client and to retrieve the current step count. The turn around worked as expected. Thanks @dested for the hint.