Reputation: 1
I am an comp engg student of 6 sem. I have created an android app which send saved text message and location in form of url to the saved mobile numbers and it is working fine. I wanted to add a feature that if power button is pressed for more than 5 seconds or 4-5 times in 10 seconds the messages should be automatically send to numbers no saved in my application. I nearly tried everything for it. Please ca you help me with these?? i can mail you my source code if you want??my email id is [email protected]
Any kind of help is appreciated.Thanks a lot for your time.
Upvotes: 0
Views: 54
Reputation: 5012
You need to listen for the KeyEvent: http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_AVR_POWER
Upvotes: 2