Reputation: 7536
I am developing an Android application in which I have one base activity(BaseActvitity B). My activity which I start from notification pending intent (Activity A) extends activity B. In activity B I have override onUserInteraction()
in following way:
@Override
public void onUserInteraction() {
super.onUserInteraction();
startActivityC();
}
Android inside onCreate:
// inside onCreate
if(notificationCondition)
{
startActivityC(Data)
}
Activity C does not extends Base Activity. Not what happens consider in my application one activity already open. once I click on notification it calls onUserInteraction
first before it call onCreate of base activity (which is parent activity for notification). Because of that It opens activity from onUserInteraction
not from onCreate. And I am not able to get that data which I am passing from onCreate. I have checked with logs it's not coming into onCreate
once it start new activity from onUserInteraction
.
Need some help. Thank you.
Upvotes: 0
Views: 285