Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - Camera with double click
    primarykey
    data
    text
    <p>Below are the important stuff. The problem is: I have the camera take a picture when I tap on the surface and store the image to the <a href="http://en.wikipedia.org/wiki/Secure_Digital" rel="nofollow noreferrer">SD card</a>. If I click two or more times before the camera stores the picture, the camera freezes and the phone need a restart. I think I have all the release stuff correct. I even implemented a boolean <code>onProgress</code> to take some action, but it seems it doesn't work.</p> <pre><code>public void onClick() { if(!onProgress) mCamera.takePicture(null, mPictureCallback, mPictureCallback); } Camera.PictureCallback mPictureCallback = new Camera.PictureCallback() { public void onPictureTaken(byte[] imageData, Camera c) { onProgress=true; if (imageData != null) { Intent mIntent = new Intent(); try { FileOutputStream out = new FileOutputStream( "/sdcard/Deltio1.jpg"); Bitmap e = BitmapFactory.decodeByteArray(imageData, 0, imageData.length); e.compress(Bitmap.CompressFormat.JPEG, 65, out); out.close(); Intent i = new Intent(ACT, MediaSend.class); ACT.startActivity(i); } catch (Exception e) { Toast .makeText( CON, "???ß??µa st?? ap????e?s?.?eßa???e?te ?t? ??ete sdcard e??atest?µ???", Toast.LENGTH_LONG).show(); ACT.finish(); } // FileUtilities.StoreByteImage(mContext, imageData, // 50, "ImageName"); SystemClock.sleep(2000); mCamera.startPreview(); onProgress=false; // setResult(FOTO_MODE,mIntent); // finish(); } } }; </code></pre> <p>You can refer to <a href="http://www.copypastecode.com/33005/" rel="nofollow noreferrer">the entire code</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload