This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Closing Activity

 
Bilal A.Siddiqui
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you start Home Activity using startActivityForResult(intent) ?
 
Bilal A.Siddiqui
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Monu

i am starting my home activity like this

Intent i = new Intent(this, Home.class);
startActivity(i);
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there is a dependency of one activity on another, you should use: startActivityForResult(intent) - onActivityResult(..) pair.
 
Bilal A.Siddiqui
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks monu

i have done it the way you said.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic