I am trying to start a thread in every activty oncreate method and after certain time i want to finish the activty from the thread calss using finish() method but finish method needs to extend activty class.so, how can i get the activty on top in my thread class..?
Share
Parse the activity to the thread in its constructor:
And when you want to end the activity from the thread-class you call: