Can you please clarify me, what’s the best practice for this example:
Activity1 does INSERTS on SQLite and starts Activity2.
On Activity2, the user clicks on Back button and goes back to Activity1.
But instead of making INSERT, I want to make UPDATE to the data on SQLite.
How do I control, that user “came” back?
What’s the best practice?
Assume on button click you starting Activity 2
In your second activity
To take control over the back button use the below code
EDIT
Call your second activity with
startActivityForResult()method which will let you know the result.In First Activity
Getting Result
In Your Second Activity
Call this method were appropriate
setResult(YOURCONSTANTNUMBER);Hope it helps