Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Getting an image from an emulator?

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.

My code is

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.

Posts: 5856
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.
    Bookmark Topic Watch Topic
  • New Topic