I am new to android. I am using browser using Intent.its working fine but am facing problem when i click on back button on device app exits. How to go to previous app when clicking on back button?
Asked
Active
Viewed 1,014 times
0
-
am using code this one Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com")); startActivity(intent); – amarnathreddy Feb 08 '13 at 11:40
-
make sure you are not finish your activity. – Maulik Feb 08 '13 at 12:40
1 Answers
0
Try this:
@Override
public void onBackPressed() {
super.onBackPressed();
Intent signup_intent = new Intent(ActivityB.this, ActivityA.class);
startActivity(signup_intent);
}
//onClick of Back button in ActivityB put this it will take you to ActivityA

user1744952
- 508
- 1
- 3
- 15