Skip to content Skip to sidebar Skip to footer

"oncreate()" Method Is Not Called From Another Intent Filter

I have an Activity --> A it has two intent filters. when it is called first time the onCreate() method is called. its ok. but when it is already called by a one intent filter an

Solution 1:

You may want to use SingleTop mode of launchMode. By using this you will receive new Intent in onNewIntent(Intent intent) of android Activity Lifecycle method.

In other words, If the activity is already there in the top, and new Intent is starting that activity, then the new Intent will be delivered to the same Activity instance on onNewIntent() method.

Post a Comment for ""oncreate()" Method Is Not Called From Another Intent Filter"