Go back after call Intent.ACTION_VIEW in android -
Go back after call Intent.ACTION_VIEW in android -
my app has 3 activity a, b, c. activity calls b. in b, phone call intent.action_view authentication twitter below:
public static void doauthen(context context, string callbackurl) throws oauthmessagesignerexception, oauthnotauthorizedexception, oauthexpectationfailedexception, oauthcommunicationexception { httpoauthconsumer = new commonshttpoauthconsumer(context.getstring(r.string.twitter_consumerkey), context .getstring(r.string.twitter_consumersecret)); httpoauthprovider = new defaultoauthprovider("http://twitter.com/oauth/request_token", "http://twitter.com/oauth/access_token", "http://twitter.com/oauth/authorize"); string authurl = httpoauthprovider.retrieverequesttoken(httpoauthconsumer, callbackurl); context.startactivity(new intent(intent.action_view, uri.parse(authurl))); }
after authentication, app called @ activity b. here b calls c. if press button, navigate browser (which used authenticate twitter before) rather b , a. how can resolve this?
please refer tasks , stack in android. can utilize 2 tasks in application - in first 1 business, in sec - authorization. start authorization intent flag flag_activity_new_task , utilize parameter android:cleartaskonlaunch. luck!
android android-intent twitter-oauth twitter4j
Comments
Post a Comment