This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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.
 
 
subject: Closing Activity
 
Similar Threads
Screen changing
how to create sdcard and mount on the emulator
Select file with AndExplorer Intent
Passing my object to one to other activity
how to transfer images to ftp server in android