Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

In android, onActivityResult method how can i know which button is clicked “Save” or “Cancel” button  RSS feed

 
Snehitha Prasad
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have called an inbuilt Calender Event from an Activity,on executing my code it is redirecting me to device calender from my activity, but i want to redirect to two different activities on save and cancel button clicks of that device calender. But how can i know whether user pressed "Save" button or "Cancel" button in the device calender in my "onActivityResult" method.

Thanks in Advance,
SNEHITHAPRASAD
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The API for onActivityResult(int,int,Intent) is here: on the Android Developers Network.

It shows you what those three parameters are, and what the likely values would be if the cancel but was pushed.
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!