I am confused in camera application what is use of DPAD_CENTER

public boolean onKeyDown(int keyCode, KeyEvent event)

{

ImageCaptureCallback iccb = null;

if(keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {

try {

String filename = timeStampFormat.format(new Date());

ContentValues values = new ContentValues();

values.put(Media.TITLE, filename);

values.put(Media.DESCRIPTION, "Image capture by camera");

Uri uri = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, values);

//String filename = timeStampFormat.format(new Date());

iccb = new ImageCaptureCallback(
getContentResolver().openOutputStream(uri));

} catch(Exception ex ){

ex.printStackTrace();

Log.e(getClass().getSimpleName(), ex.getMessage(), ex);

}

}

if (keyCode == KeyEvent.KEYCODE_BACK) {

return super.onKeyDown(keyCode, event);

}

if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {

camera.takePicture(mShutterCallback, mPictureCallbackRaw, iccb);

return true;

}

return false;

}



what is use of Keycode_dpad_center    which key is used for dpad_center

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to