camera - code work on android 4.1 but don't on 4.2 (possible?) -


i'm writing application record video front camera. possible app can't work on android 4.2? i've tried tablet 4.1.1, customer says not work in tablet.

this code related recording:

//create surface view  public void surfacecreated(surfaceholder holder) {                        mcamera= camera.open(1);                     setcameradisplayorientation( this, 1, mcamera);                      viewgroup.layoutparams params = msurfaceview.getlayoutparams();                      parameters parameters = mcamera.getparameters();                     list<size> sizes = parameters.getsupportedpreviewsizes();                      params.width = (sizes.get(0).width / 4);                     params.height = (sizes.get(0).height / 4);                      msurfaceview.setlayoutparams(params);              } 

i things error in code

edit

i have insert lot of log... app freezing when stopping recorder. call on trycatch..

try{                                      appendlog("rigo 497 stoppo il recorder");                                  recorder.stop();                                  }                                  catch(illegalstateexception e){                                         e.printstacktrace();                                          appendlog("rigo 501 (errore nello stoppare il recorder)" + e.tostring());                                     }                                 catch(exception f){                                     f.printstacktrace();                                      appendlog("rigo 506 (errore nello stoppare il recorder)" + f.tostring());                                 }                                  appendlog("rigo 508 provo rilasciare il recorder" );                                  recorder.release(); 

the log have last message "rigo 497 stoppo il recorder" after nothing happen


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -