Hi Abhi, can you paste the code? Maybe I can help better with more information.
Regards, Rogerio 2010/2/10 Abhi <abhishek.r.sha...@gmail.com> > Tried this... doesn't work :( > > > > On Feb 5, 1:36 pm, Abhi <abhishek.r.sha...@gmail.com> wrote: > > Great! I will try this out right away. > > > > Thanks Roger. Appreciate it. > > > > Abhi > > > > On Feb 5, 12:47 pm, Rogério de Souza Moraes <rogerio.so...@gmail.com> > > wrote: > > > > > > > > > HiAbhi, > > > > > it is possible. You can do like this: > > > > > private class ExpandedDialog extends Dialog { > > > ExpandedDialog(Context context) { > > > super(context, > > > com.android.internal.R.style.Theme_Light_NoTitleBar); > > > } > > > > > @Override > > > public boolean dispatchKeyEvent(KeyEvent event) { > > > boolean down = event.getAction() == KeyEvent.ACTION_DOWN; > > > switch (event.getKeyCode()) { > > > case KeyEvent.KEYCODE_BACK: > > > if (!down) { > > > StatusBarService.this.deactivate(); > > > } > > > return true; > > > } > > > return super.dispatchKeyEvent(event); > > > } > > > } > > > > > This example is inside the file StatusBarService.java in SDK. Here, > this > > > class gets the event when the user presses the back button and execute > his > > > function. > > > > > Regards, > > > > > Rogerio > > > > > 2010/2/5Abhi<abhishek.r.sha...@gmail.com> > > > > > > Hi, > > > > > > Is it possible to launch another activity or invoke a sensor (e.g. > > > > accelerometer) on the press of capture or video record button? > > > > > >Abhi > > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Beginners" group. > > > > > > NEW! Try asking and tagging your question on Stack Overflow at > > > >http://stackoverflow.com/questions/tagged/android > > > > > > To unsubscribe from this group, send email to > > > > android-beginners+unsubscr...@googlegroups.com<android-beginners%2bunsubscr...@googlegroups.com> > <android-beginners%2bunsubscr...@googlegroups.com> > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-beginners?hl=en- Hide quoted > text - > > > > - Show quoted text - > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow at > http://stackoverflow.com/questions/tagged/android > > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com<android-beginners%2bunsubscr...@googlegroups.com> > 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. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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