just want to ask on how to call the Back button of an android phone to go back to previous screen or transaction? because as I hit on the back button of the device the application totally closes. I am building the application through eclipse with PhoneGap.
Could you guys give me an example code or function on how to call the back button to go to previous page?
Thank you guys for your big help.
If there is nothing to go back to (ie. if the current Activity is the only one in the Stack), the app will close (that is the way Android is designed to work).
ReplyDeleteYou can call finish() in your Java code (not sure about PhoneGap) to automatically go to the previous Activity.
Good Luck. (Don't forget to mark correct)
This is really good information I have visited this blog to read something fresh and I really admire you efforts in doing so.
ReplyDelete