Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package com.android.CamTest; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.hardware.Camera; import android.hardware.Camera.PictureCallback; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.Window; // ---------------------------------------------------------------------- public class CamTest extends Activity { private Preview mPreview; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Hide the window title. requestWindowFeature(Window.FEATURE_NO_TITLE); // Create our Preview view and set it as the content of our activity. mPreview = new Preview(this); setContentView(mPreview); } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); menu.add(0, 1, 0, "take picture"); menu.add(0, 2, 0, "view picture"); return true; } @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { switch(item.getItemId()) { case 1: try { mPreview.captureImage(); } catch (Exception e) { e.printStackTrace(); } break; case 2: Intent i = new Intent(this, FingerPaint.class); if(mPreview.picdata != null) i.putExtra("picdata", mPreview.picdata); // mPreview.mCamera.release(); // setContentView(R.layout.main); startActivity(i); break; } return true; } } // ---------------------------------------------------------------------- class Preview extends SurfaceView implements SurfaceHolder.Callback { SurfaceHolder mHolder; public Camera mCamera; public Bitmap bm; public byte[] picdata; Preview(Context context) { super(context); // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public void surfaceCreated(SurfaceHolder holder) { // The Surface has been created, acquire the camera and tell it where // to draw. mCamera = Camera.open(); mCamera.setPreviewDisplay(holder); } public void surfaceDestroyed(SurfaceHolder holder) { // Surface will be destroyed when we return, so stop the preview. // Because the CameraDevice object is not a shared resource, it's very // important to release it when the activity is paused. mCamera.stopPreview(); mCamera = null; } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // Now that the size is known, set up the camera parameters and begin // the preview. Camera.Parameters parameters = mCamera.getParameters(); parameters.setPreviewSize(w, h); mCamera.setParameters(parameters); mCamera.startPreview(); } public void captureImage() { Camera.Parameters params = mCamera.getParameters(); mCamera.setParameters(params); Camera.PictureCallback cb = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { picdata = data; // bm = BitmapFactory.decodeByteArray(data, 0, data.length); try { // FileOutputStream out = new FileOutputStream("/sdcard/mypick.png"); // myimage.compress(Bitmap.CompressFormat.PNG, 10, out); // out.close(); } catch (Exception e) { e.printStackTrace(); } // ImageView mImageDisplay = (ImageView) findViewById(R.id.image_display); // mImageDisplay.setImageBitmap(b); } }; mCamera.takePicture(null, null, cb); mCamera.stopPreview(); // mCamera.release(); } }