java - Android: setPictureFormat() error -


i'm beginner in andoird, trying write application using camera class of android in eclipse. problem when call parameters.setpictureformat() method imageformat.jpeg argument, error.

here's how code looks like:

  public void surfacechanged(surfaceholder holder, int format, int w, int h){    camera.parameters parameters = mcamera.getparameters();     parameters.setpreviewsize(854,480);  // (h,w)    parameters.setpictureformat(imageformat.jpeg);    parameters.set("jpeg-quality", 100);    parameters.set("orientation", "lanscape");    parameters.set("rotation", 90);    mcamera.setparameters(parameters);    mcamera.startpreview(); } 

and error in return:

imageformat cannot resolved variable 

i've tried using pixelformat.jpeg well, same error says "pixelformat cannot resolved variable". i've checked, it's not importing android.r. tried importing android.graphics.imageformat doesn't work.

could point out problem is?

for target trying build app? android.graphics.imageformat available android 2.2. suppose selected target android 2.0 or below.

two important points:

  • for android 1.5 , android 1.6, can't call setpictureformat. getpictureformat supported.
  • for android 2.0 need call getsupportedpictureformat list of formats supported.

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -