This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin 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
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Getting an image from an emulator?  RSS feed

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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!