Thanks for previous replies,
Is it possible to get Package name of camera application which is installed on the device? If the OS is customized the default package n
I am not sure, but I think you can get package name of application using specified intent..
Look at this code for getting available application information which handle the specific intent,
/**
* Indicates whether the specified action can be used as an intent. This
* method queries the package manager for installed packages that can
* respond to an intent with the specified action. If no suitable package is
* found, this method returns false.
*
* @param context The application's environment.
* @param action The Intent action to check for availability.
*
* @return True if an Intent with the specified action can be sent and
* responded to, false otherwise.
*/
public static boolean isIntentAvailable(Context context, String action) {
final PackageManager packageManager = context.getPackageManager();
final Intent intent = new Intent(action);
List list =
packageManager.queryIntentActivities(intent,
PackageManager.MATCH_DEFAULT_ONLY);
return list.size() > 0;
}
Now using Camera intent you can get the application information which handles the IMAGE_CAPTURE intent and using that information you can easily get package name.
Update:
In your case the specific intent is
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
EDIT:
List listCam = packageManager.queryIntentActivities(intent, 0);
for (ResolveInfo res : listCam) {
Log.e("Camera Application Package Name and Activity Name",res.activityInfo.packageName + " " + res.activityInfo.name));
}
Try this and let me know what happen..