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
-1
votes
3 answers

Do action if app paused for more than 5 minutes

I have an android app and I would like to be able to set it that if the app is minimized for less that 5 minutes it will resume normally but if for over 5 minutes will will be restarted like a banking app works. I can't find anything on this can be…
Errkal
  • 67
  • 1
  • 8
-1
votes
1 answer

Using onResume() and onPause() outside of MainActivity

I'm wondering if it's possible to use onResume() and onPause() outside the MainActivity. In my android project, I have the typical setup for my main class package com.my.package public class MainActivity extends AppCompatActivity { @Override …
newbie 14
  • 3
  • 2
-1
votes
2 answers

Android - Already Loaded data not display when first time start the application from recent app

In my application, I have some data to display in the dashboard which are coming from the sqlite db. But when I put the app to the recent app and open the app from the recent app list on next day, those data don't display and showing the error…
-1
votes
4 answers

onResume() getting called on pressing back arrow. Please see details

I have a method in onResume() which fetches user's data and should get called when user launch the app. This is working fine. The problem is that for example after opening 'Settings' when I tap/click on the back arrow, the method in onResume() gets…
Hammad Nasir
  • 2,889
  • 7
  • 52
  • 133
-1
votes
2 answers

Restart activity - dealing with two fragments into a container

I have an activity that has a container. And i have two fragments that I'm replacing into this container. The fragments are fragmentList and fragmentDetail First time I'm adding the list fragment into the container MainActivity OnCreate if…
rafaelasguerra
  • 2,685
  • 5
  • 24
  • 56
-1
votes
1 answer

Why onResume() runs twice, secondly with null

I have got error Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference and it is caused by my onResume() method which runs twice. MainFragment which is containing few tabs caused…
y07k2
  • 1,898
  • 4
  • 20
  • 36
-1
votes
1 answer

Close app when minimized

I have similar problem like this. On start my app displays a splash screen and checks via network if the current user is still premium. My problem: I started my app right before I went to bed and minimized it by pressing the home button. In the…
Pratheesh
  • 764
  • 1
  • 11
  • 24
-1
votes
1 answer

onResume stops my application

My application gets serial USB input with FTDI chip, I managed to do it. As I press a button I get 3 input float type numbers displayed on my app. Here is the onClick: public void onReadClick(View view) throws UnsupportedEncodingException { …
Digol
  • 390
  • 1
  • 15
-1
votes
1 answer

How to resume paused activity

I have been trying to resume/restart an activity. Expected Result:-When the user opens App the Menu Activity opens after Splash Screen with its background music.And then one can navigate to other activities.So after moving to other activity and…
-1
votes
2 answers

onResume and onCreate

My app loads on the emulator but does not do what I ask it to do. I have put the code in the onResume method, where it is supposed to loop 3 times with 15 second breaks in between. It doesn't do this. Are there any methods that can do this? To…
Anish Muthali
  • 782
  • 2
  • 7
  • 20
-1
votes
1 answer

NullPointerException on DialogFragment at onResume()

I have a a DialogFragment that has this particular onResume code to handle the back press. Unfortunately my code keeps generating that NullPointerException (I'm catching it) but I don't know why it's happening. This happens every time the…
Brandon
  • 1,401
  • 1
  • 16
  • 25
-1
votes
1 answer

onResume() in activity is not run properly

I override onResume() in MainActivity and expecting it to be called when the app is resume. It does call the onResume as I checked on LogCat, but it didn't function properly as expected. Below is the method onResume: @Override protected void…
yodann
  • 179
  • 1
  • 11
-1
votes
3 answers

The App crashes when it goes in onPause?

I have 2 broadcastReceivers are registered from onResume when the toggle button is clicked. And in onPause i unregister them, but when I press the home button the App crashes an logcat generates the below errors. Code_Updated_2: @Override protected…
Amrmsmb
  • 1
  • 27
  • 104
  • 226
-1
votes
1 answer

PIN lock implementation

I'm building an app which requires some security. Everytime user quit the application with the Home button, or when he locks the phone and unlocks it, a PIN code is prompted. To add this feature, I need a callback fired when these situations happen.…
Rogue
  • 751
  • 1
  • 17
  • 36
-1
votes
1 answer

Why are Images not displayed on app resume?

I have built an app where I'm displaying a series of tabs and each tab has a Listview with images and texts (vertical layout). I have almost finished and i'm running some final tests and I have noticed the following: open the application All images…
chris.b
  • 33
  • 6