Background
i'm trying to open a specific profile page on the facebook app (when facebook app is installed of course).
The problem
I've noticed that if I, as an end user, go to the app info screen (where i can uninstall the app, clear its cache etc...) of facebook app and choose "force stop", and then try to open the profile page, the facebook app itself either crashes or doesn't even start.
if the facebook app was already running, the code works fine.
The code
context.getPackageManager().getPackageInfo("com.facebook.katana", 0);
final String facebookScheme = String.format("fb://profile/%s", socialNetworkUid);
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(facebookScheme));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NO_HISTORY
| Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
return intent;
BTW, the scheme was found from this link.
The question
- why does it occur?
- can i somehow avoid it?
- is it a bug on facebook app or maybe i didn't implement it correctly?
- do I really need now to check if FB app is active and only then allow to use this intent? if so, how?