Greetings When I check for camera existence in android phone I start with the following function :
Android API Question
1
Greetings
When I check for camera existence in android phone I start with the following function :
public static boolean deviceHasCamera(Context context)
{
if ( context.getPackageManager().hasSystemFeature(Packa geManager.FEATURE_CAMERA))
return true;
else
return false;
}
The question is why should I pass context as an argument and what is Context Identifier
Thanks
When I check for camera existence in android phone I start with the following function :
public static boolean deviceHasCamera(Context context)
{
if ( context.getPackageManager().hasSystemFeature(Packa geManager.FEATURE_CAMERA))
return true;
else
return false;
}
The question is why should I pass context as an argument and what is Context Identifier
Thanks
Next Topics on Trending Feed
-
1