You have to explore the life cycle from its Activity
using onResume()
. You would have to put your search again within the method.
@Override
public void onResume(){
super.onResume();
// coloque sua busca novamente aqui
}
Life cycle
As the user navigates, exits, and returns to your application, the Activity
instances in the application transit between different states in the lifecycle. For example, when the activity starts for the first time, it is in the foreground in the system and has the user focus.
During the process, the Android system calls a number of lifecycle methods in the activity, where you define the user interface and other components. If the user performs an action that starts another activity or switches to another application, the system calls another set of lifecycle methods in its activity as it sits in the background (where the activity is no longer visible, but the instance and its state remain intact).
Details