I am working on one application. In my application I have three tabs. In the 3rd tab I have implemented some LinkedIn integration using their SDK, so that user can share on his LinkedIn account wall.
Everything seems to be working fine if I don't use this code inside tabs. But if I integrate the code that uses the LinkedIn SDK inside tabs, then onNewIntent()
is not fired.
I am integrating LinkedIn like this:
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(liToken.getAuthorizationUrl()));
i.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(i);
It basically opens a web page and when comes back it restarts my previous activity from where i called the LinkedIn SDK, but having no tabs at the bottom.
I want my app to come to my previous activity, and onNewIntent()
should be called even when my code is moved inside tabs. How can I achieve it?
Thanks
I found that onNewIntent will be called as described in documentation if both launchMode="singleTop" and Intent.FLAG_ACTIVITY_SINGLE_TOP are setted.
Set your activitys launchMode="singleTop" in the AndroidManifest.xml instead?