Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Android API Question (https://www.warriorforum.com/programming/1097099-android-api-question.html)

YSH 4th August 2015 12:01 PM

Android API Question
 
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 :D

Thanks


All times are GMT -6. The time now is 05:57 AM.