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)
public class CameraApiTest extends Activity implements SurfaceHolder.Callback { private SurfaceView mSurfaceView; private SurfaceHolder mSurfaceHolder; private Button btn1, btn2, btn3, btn4; private Camera mCamera; boolean mPreviewRunning = false; public void onCreate(Bundle icicle) { super.onCreate(icicle); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.camera_api_test); btn1 = (Button) findViewById(R.id.btn1); btn2 = (Button) findViewById(R.id.btn2); btn3 = (Button) findViewById(R.id.btn3); btn4 = (Button) findViewById(R.id.btn4); setAllButton(View.INVISIBLE); btn1.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { setAllButton(View.INVISIBLE); mCamera.startPreview(); }}); mSurfaceView = (SurfaceView)findViewById(R.id.surface); mSurfaceHolder = mSurfaceView.getHolder(); mSurfaceHolder.addCallback(this); mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public boolean onCreateOptionsMenu(android.view.Menu menu) { MenuItem item = menu.add(0, 0, 0, "goto gallery"); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { Uri target = Uri.parse("content://media/external/images/media"); Intent intent = new Intent(Intent.ACTION_VIEW, target); startActivity(intent); return true; } }); return true; } Camera.PictureCallback mPictureCallback = new Camera.PictureCallback() { public void onPictureTaken(byte[] data, Camera c) { Bitmap bm = BitmapFactory.decodeByteArray(data, 0, data.length); FileOutputStream fos = null; try { fos = new FileOutputStream("/sdcard/aa.jpg"); } catch (FileNotFoundException e) { e.printStackTrace(); } BufferedOutputStream bos = new BufferedOutputStream(fos); bm.compress(Bitmap.CompressFormat.JPEG, 0, bos); try { bos.flush(); bos.close(); } catch (IOException e) { e.printStackTrace(); } setAllButton(View.VISIBLE); } }; public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return super.onKeyDown(keyCode, event); } if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { mCamera.takePicture(null, null, mPictureCallback); return true; } return false; } public void surfaceCreated(SurfaceHolder holder){ mCamera = Camera.open(); } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h){ if (mPreviewRunning) { mCamera.stopPreview(); } Camera.Parameters p = mCamera.getParameters(); p.setPreviewSize(w, h); mCamera.setParameters(p); mCamera.setPreviewDisplay(holder); mCamera.startPreview(); mPreviewRunning = true; } public void surfaceDestroyed(SurfaceHolder holder){ mCamera.stopPreview(); mPreviewRunning = false; mCamera.release(); } private void setAllButton(int visibility){ btn1.setVisibility(visibility); btn2.setVisibility(visibility); btn3.setVisibility(visibility); btn4.setVisibility(visibility); } }