Question

I'm trying to figure out is there a way to let my app runs on devices with front camera only. Well, I think I should make it through <uses-feature> in AnrdoidManifest.xml.

I made it like that:

<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera.front" android:required="true"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>

but it doesn't help. I mean I can run it on my device without front-facing camera. But maybe this features don't let users to download an app if their device doesn't have such feature?

If I'm wrong, please tell me the right way to solve my problem.

Regards, Dmitriy.

Was it helpful?

Solution

The users won't be able to download it from the Android Market if they don't have a front camera thanks to the uses-feature. So don't worry about that.

Now, in case someone "steals" your apk, then you can check this link to see how you programmatically check for a front camera.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top