java - Android Studio Facebook: onActivityResult in normal class -


in order listen facebook login event must override in activity function onactityresult , make call facebook's callbackmanager.

protected void onactivityresult(int requestcode, int resultcode, intent data) {     super.onactivityresult(requestcode, resultcode, data);      callbackmanager.onactivityresult(requestcode, resultcode, data); } 

so far everything's working.

i'd create static class facebook handles facebook callbacks, such login, etc.

is there substitute onactivityresult in case?

you mean want class handle activity returning? have have onactivityresult of activity calls startactivityforresult call facebook class. there's no way reroute automatically.


Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -