I need to check a condition in the passed bundle value from the previous activity before the current activity is created.
I dont want to use the condition in Oncreate() method.
(I need to check the condition before the activity is created and decide whether to create activity or not)
How can I achieve this? Is there any methods which is useful for this?
Please Help.
onCreate is the first method called in Activity creation so you’d need to check it there and if you don’t want the Activity to run, call finish() from the onCreate method.
Can you check the condition before you start the Activity (via Intent I would guess)?