Yes, this is the better method. The only thing I would add is that the class PackageManager is itself in the Java package android.content.pm -- not an obvious place, but not too hard to figure out.
On Jun 29, 5:12 pm, Dianne Hackborn <[email protected]> wrote: > Use PackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA). > > Of course if your app requires a camera, you should declare so in your > manifest so that devices without a camera won't see it. > > On Thu, Jun 24, 2010 at 4:53 AM, Daman <[email protected]> wrote: > > How can I detect the presence of camera on an Android device? > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<android-developers%[email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

