aspose file tools*
The moose likes Android and the fly likes Closing Activity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Closing Activity" Watch "Closing Activity" New topic
Author

Closing Activity

Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
Hi all

I have 3 activities (MAIN, LOGIN and HOME)

now from home i want to close my application , in home my closing code looks like this


in login


The problem is my onActivityResult method in login is not called at all.


Regards
Bilal
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

Did you start Home Activity using startActivityForResult(intent) ?


[List of FAQs] | [Android FAQ] | [Samuh Varta]
Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
Hi Monu

i am starting my home activity like this

Intent i = new Intent(this, Home.class);
startActivity(i);
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

If there is a dependency of one activity on another, you should use: startActivityForResult(intent) - onActivityResult(..) pair.
Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
thanks monu

i have done it the way you said.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Closing Activity