Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting an image from an emulator?

 
Aanya Anna
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to get images from an emulator. when I try take image using an emulator i get the following error.
Uncaught TypeError: Cannot call method 'getPicture' of undefined at file:///android_asset/www/index.html:67
When I try to get image from a photolibrary i get the following error
Uncaught TypeError: Cannot read property 'PHOTOLIBRARY' of undefined at file:///android_asset/www/index.html:97
To read image from PHOTOLIBRARY do we need a FOLDER named PHOTOLIBRARY in the SD Card.
Also can we take a dummy picture using the emulators in built camera? Or do we need a webcam connected.
I am a bit confused and running on a deadline.
Could someone help me figure this out please.
Thanks....


My code is



 
Przemek Boryka
Ranch Hand
Posts: 51
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !

Your written code looks like JavaScript nested in HTML. Maybe I'm wrong, but you write in wrong place.

When you post your code, put it in code tag, it will be easier to understand it.

Bye!
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, the emulator doesn't have a camera, so you cannot use it to test camera functions - you'll need a real Android device that has a camera.

Based on your code, I assume that you are running this HTML page via a browser in the emulator/device, or are you using some framework that lets you write javascript apps for Android? It sure doesn't look like code that you would write for the standard Android SDK.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic