I believe that would be clicking of a trackball on devices with a trackball
or the middle button on devices with a d-pad (directional buttons plus
center button).

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Tue, Dec 15, 2009 at 12:38 PM, saurabh sinha <[email protected]> wrote:

> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en

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

Reply via email to