In case of Home and Back event both cases calls the android pause method of activity life cycle.
On Wed, Nov 23, 2011 at 2:47 PM, skink <[email protected]> wrote: > > > On Nov 23, 10:01 am, NaveenShrivastva <[email protected]> > wrote: >> Please give me guideline how to handle the home event and pause event >> in code separately. >> >> >> >> On Wed, Nov 23, 2011 at 2:03 PM, skink <[email protected]> wrote: >> >> > On Nov 23, 9:00 am, Naveen <[email protected]> wrote: >> >> How to handle Home and Back key of a device. >> >> >> down vote favorite >> >> 3 >> >> share [fb] share [tw] >> >> >> So I have this method in one of my Android Activities: >> >> >> @Override >> >> public boolean onKeyDown(int keyCode, KeyEvent event) >> >> { >> >> if(keyCode == KeyEvent.KEYCODE_BACK) >> >> { >> >> Log.d("Test", "Back button pressed!"); >> >> } >> >> else if(keyCode == KeyEvent.KEYCODE_HOME) >> >> { >> >> Log.d("Test", "Home button pressed!"); >> >> } >> >> return super.onKeyDown(keyCode, event); >> >> >> } >> >> >> Here this code only works with back button but not with home key.. >> >> >> Please help me , i want seperate functionality on Home key separate >> >> functionality on back key. >> >> > you cannot handle home key in your app, fortunatelly >> >> > pskink >> >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Android Developers" 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-developers?hl=en > > what do you mean: home event and pause event? > > pskink > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" 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-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en -- Go to Master Mind Web Earner Blog :- http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in Unsubscribe All Group Post :- http://j.gs/624707/unsubscribe http://q.gs/624707/unsubscribe Subscribe All Group Post :- http://j.gs/624707/subscribe http://q.gs/624707/subscribe Make Money E-mail Sending Job :- http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in -- You received this message because you are subscribed to the Google Groups "SAP-Jobs-SAP-FAQ" 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/sap-jobs-sap-faq?hl=en.

