Ravikant Tiwari Ravikant Tiwari -4 years ago 164
Android Question

Facebook not installed on device but package com.facebook.katana exists

I was trying to check whether facebook app is installed on a device or not.

while searching i found this link How to check if Facebook is installed Android

based on the above link my method is as below

PackageManager pm = getPackageManager();
PackageInfo pinfo=null;
try {
return ((pinfo!=null)?true:false);
} catch (PackageManager.NameNotFoundException e) {
return false;

i checked the device facebook is not in installed app list,but the flag is always true and even package manager didn`t throw the NameNotFoundException.

when i try to launch fb activity like this nothing happens

File file = new File(imagePath);
final Intent fbIntent = new Intent(Intent.ACTION_SEND);
Uri fileUri = FileProvider.getUriForFile(this, "com.test.provider", file);
fbIntent.putExtra(Intent.EXTRA_STREAM, fileUri);

I also checked the code for package name "com.facebook.orca" also which is package name for messenger app.

what could be the possible reason or any other method to perform this check.

Answer Source

Is is not at all possible that android system show wrong information about an app as installed in device. In your case I have checked the code and it is completely ok, so the only reason why you are not being able to see facebook app in your device while the above code shows that package "com.facebook.katana" is -

Your facebook app is in disabled state

Yes, it seems that you were having facebook app as system app (pre installed to device) and now it is disabled. To check, you may go into your settings and find something like "Manage Applications". Go to the very bottom of the list in All Applications and you should find all the disabled apps there.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download