How To Check If Facebook Is Installed Android - Stack Overflow PDF
How To Check If Facebook Is Installed Android - Stack Overflow PDF
Stack Overflow
log in
49
package
I am modifying my app to be able to catch if a user tries to publish without having the facebook app installed (required for SSO). Here is the code I am
using:
try{
ApplicationInfo info = getPackageManager().
getApplicationInfo("com.facebook.android", 0 );
return true;
} catch( PackageManager.NameNotFoundException e ){
return false;
}
The problem is, it is always catching an error. According to the question here, I need to request the appropriate permission but I don't know what
permissions I need to request.
Is my problem a permission one or something else?
share
3 Answers
71
com.facebook.android is the package name for the Facebook SDK. The Facebook app is com.facebook.katana.
Asked
Jul 15 '11 at 18:01
Order By
Votes
share
Answered
Jul 15 '11 at 18:06
Best Approach is to pick the package name including com.facebook but anyway you may use following packages:
com.facebook.orca
com.facebook.katana
com.example.facebook
com.facebook.android
share
-2
Answered
Feb 9 '15 at 16:54
share
Answered
Dec 9 '14 at 9:57
christiandev
10.5k 7 21 50
Edited
Dec 9 '14 at 10:00
answer not relevant to the question. He was asking something else. AndroidMechanic Dec 16 '15 at 22:01
add a comment
Your Answer
log in
or
Name
By posting your answer, you agree to the privacy policy and terms of service.
meta chat tour help blog privacy policy legal contact us full site
Download the Stack Exchange Android app
2016 Stack Exchange, Inc