For invoke search android example, every time query search result is received by onCreate().
How can i make it received by onNewIntent(). What kind of operation can cause onNewIntent() receive intent?
For invoke search android example, every time query search result is received by onCreate().
Share
Your activity needs to declare
android:launchMode="singleTop"in the manifest foronNewIntent()to be called. If a new intent is received and an instance of the activity does not exist on the activity stackonCreate()will be called. If it does exist in the activity stack,onNewIntent()will be called instead.The docs for android:launchMode go into a bit more detail.