Wednesday, June 30, 2010

[android-developers] Re: How to detect presence of camera on an Android device.

I am afraid using using ErrorCallback wont work.
You can only place the ErrorCallback on an Camera object, but you wont
get a camera object until you call Camera.open().
Hope you got my point.

Thanks,
Daman

On Jun 30, 3:47 am, Indicator Veritatis <mej1...@yahoo.com> wrote:
> I think the intent of the designer of Android is that instead of
> detectingcamerapresence at runtime, developers should declare theCAMERApermission in the AndroidManifest file. Also, include the <uses-
> feature> tag. Then your application would be downloaded only to
> devices that have acamera.
>
> But just in case you really do have some interesting application that
> really should be downloaded on either, you can always resort to the
> open() method of theCameraobject, (from the android.hardware
> package) and check for error. Don't forget to set the callbackCamera.ErrorCallback (define its onError() method).
>
> On Jun 28, 9:41 pm, Ashutosh Sharma <ashusha...@gmail.com> wrote:
>
> > I too am trying to figure this out - is there a reliable way to know
> > whether a device hascamerahardware at all?
>
> > Thanks,
> > Ashutosh

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate