1

How to stop an activity in android using intent?

view story
linux-howto

http://stackoverflow.com – I think this is a basic question. Is there any option to stop an activity by using intent. Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:5554")); startActivity(intent); This is my code. I would like to stop this activity (That means, i want to drop this call) if the user is busy or something. What can I do for that? I tried this: if (condition) { Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:5554")); startActivity(intent); }else { this.finish(); } But of no use. Does anybody have a suggestion? (HowTos)