Questions tagged [onresume]

onResume is an Activity life-cycle event generated by the Android OS when an Activity becomes the top-most one in the stack.

onResume is an Activity life-cycle event generated by the Android OS when an Activity becomes the top-most one in the stack.

More can be read about this at the Android Developer Site.

712 questions
-3
votes
1 answer

Making the code in an Activity into a Service difficulties

How can I modify this Activity to a Service, I want to be able to call this service from another Activity and for it to be able to work in background even when the user isn't actually in the app. When I tried to convert it into a Service I had…
Jawee
  • 145
  • 1
  • 1
  • 10
-3
votes
2 answers

Runnable, Pause and Resume thread

my app is working fine but i cant figure out why my void run(); still runs in the background when i click the "home" button. I want my thread to pause the Thread onPause and start the thread again when onResume() i called! Cant figure out what im…
Spoofy
  • 621
  • 4
  • 9
  • 27
-3
votes
2 answers

Android finish Activity and then resume Activity parent

MainActivity --(starts)--> LoginActivity--(if login success)-->MainActivity (with updated data). I want to finish LoginActivity then start MainActivity with layout login successfull I've tried with this code : Intent intent = new…
-3
votes
2 answers

Cancel timer in onResume()?

Is it possible to cancel a countdown timer in the onResume() method ? For example: when the back button is pressed the onResume() method is called. I want to cancel the timer when it is in the login activity, in case of any other activity I want the…
user1420943
  • 97
  • 1
  • 1
  • 7
-4
votes
1 answer

LinkedHashSet not mainting order

Hi I am trying to allow the user to enter values which will be stored in a list. When the user exits that activity I want that list to be stored (IN THE SAME ORDER) to SharedPreferences and then once the user returns I want it to be displayed again…
Aaron
  • 47
  • 11
-4
votes
1 answer

Resuming music in android

Music does not resume after pressing home button and then pressing the app from recent list. Please make necessary changes in the code given. public class MainActivity extends AppCompatActivity { @Override protected void onPause() { …
user6930425
-7
votes
3 answers

Android:What will happen if onResume method is not called on android activity?

For example, I have an activity named MyActivity and it doesn't have the function onResume(). So basically what would happen if I resume the activity? Will it call the onCreate() method or something else?
Pigeon App
  • 79
  • 1
  • 1
  • 8
1 2 3
47
48