Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- Intent intent = new Intent(Intent.ACTION_VIEW, "your app content");
- // narrow down to official facebookapp if available
- List<ResolveInfo> matches = this.context.getPackageManager().queryIntentActivities(intent, 0);
- for (ResolveInfo info : matches) {
- if (info.activityInfo.packageName.toLowerCase().startsWith("com.facebook.katana")) {
- intent.setPackage(info.activityInfo.packageName);
- }
- }
- this.context.startActivity(intent);
- } catch (NullPointerException e) {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement