How do I use onNewIntent inside a ListView activity? Actually I am displaying a ListView, while displaying I got an event or status from the server side and then I need to make some changes inside the currently displaying ListView(e.g here the ListView is a contact list and based on event I want to change the text color of particular items as online/offline status).
So my point is, is there any way to get the status inside the ListView activity or ArrayAdapter so that I can make the changes whatever is required as my previous intent is already running I dont want to make any changes in that, does onNewIntent allow me to do the same that I’m looking for?
Mark your activity as
android:launchMode="singleTop"in AndroidManifest.xml and then overrideonNewIntent()to capture new intents. Afterwards, perform your changes in list’s data and finally callyourAdapter.notifyDataSetChanged()to apply changes.