KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Hi all I'm trying out the android passing of intents between 2 classes and I've realized there are 2 methods to passing intents , The first is using getIntent method here: Bundle extras = getIntent().getExtras(); mRowId = (extras != null) ? extras.getLong(DrugsDbAdapter.KEY_ROWID) : null; And the second method is accessing the savedInstanceState: mRowId = (savedInstanceState != null) savedInstanceState.getLong(DrugsDbAdapter.KEY_ROWID) : null; In both methods I'm trying to access the RowId which I can then use to fetchData. Whats the difference between both methods ? Which one is better ?
Tags (comma-separated)
Save Edits
Cancel