android - How to get result from external application's activity? -
how result external application's activity application has triggered know change.
for e.g:
my application needs check if user has been logged in. if not logged in, allows login through external app.
so current app. call onactivityforresult() trigger external app's activity , onactivityresult() called processing exit status of external app's activity.
solved.
sorry goof up.
i have realized made mistakes entire session of testing. understanding , code fine, every time made changes both files, never ran external app. updated code.
even found solution myself, considering nanne's answer hint solution, marked accepted answer.
thanks , sorry ur precious time.
your activity you've started should set result-value setresult(intvalue)
your first activity, called startactivityforresult()
can check result code provided in example
protected void onactivityresult(int requestcode, int resultcode, intent data) { if (requestcode == pick_contact_request) { if (resultcode == result_ok) { //do } } }
Comments
Post a Comment