Questions tagged [onpause]

onPause is an Activity life-cycle event generated by the Android OS when an Activity is no longer the top-most one in the stack.

onPause is an Activity life-cycle event generated by the Android OS when an Activity is no longer the top-most one in the stack.

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

462 questions
0
votes
1 answer

Pause and Resume Buttons in VBA

I have a VBA subprogram which draws some shapes in spreadsheet and moves them around. This is what my subprogram called Sub Assignment(amplitude As Double, deltaphase As Double) I take my amplitude and deltaphase values from a form. There are three…
user1143529
  • 53
  • 1
  • 3
  • 6
0
votes
1 answer

Pause an Android activity when a Dialog is shown

I have a question about activity and dialog interaction. In my Android application I have a page that allow the user to scan a QRCode, and when a valid QRCode is scanned the application will open a Dialog. The problem is that I want to disable the…
kareth
  • 1
  • 1
  • 2
  • 5
0
votes
2 answers

Semi-persisting data for one screen only

what Iam doing is a simple game which when beaten, goes to a new activity, there it starts a AsyncTask and submits user score to the server, server responds with a array of scores (few better than me, me, few worse than me). What I want to do is…
urSus
  • 12,492
  • 12
  • 69
  • 89
0
votes
2 answers

Html5 Video. After 20 secs of pause reset player

So im working on a school project for a museum, we are making an info screen with a video to play for the visitors, ill like to make a function so that if one visitor is pausing the video and leave it will reset after 20 sec or so. So the next…
Legarndary
  • 957
  • 2
  • 16
  • 37
0
votes
1 answer

Android Java get if minimized

Is there anyway to check if the application is minimized or if you have locked your device? Because when I do minimize / lock my device the application is still runnig, this is mainly because I'd like to pause the music / sfx not to annoy people..…
Rasmus
  • 1,605
  • 3
  • 16
  • 20
0
votes
2 answers

Passing items to onPause() method

I know this is a basic question, but I'm pretty new to all of this. In the code below, I have this onPause method: public void onPause(){ super.onPause(); InputMethodManager imm = (InputMethodManager)…
Jake Evans
  • 307
  • 6
  • 19
0
votes
2 answers

activity onPause how to save the interface data

Hello I have in my app 2 activities and I want that when I switch between them the user interface and the Variables wont change is there any way to do it. Thanks for the help
dorbt12
  • 139
  • 2
  • 10
0
votes
2 answers

Button syncronized with thread android

How create a button which pause the thread which is inside the loop and another button which resumes. Runnable myRun = new Runnable(){ public void run(){ for(int j =0 ;j<=words.length;j++){ synchronized(this){ try { …
lavin
  • 1
  • 2
0
votes
1 answer

How can I make a pause function for WebClient()?

I'm making a YouTube Downloader, I've finished everything [ The application is completed now ] but this annoys me ; How to make something can pause this downloader try { wc = new WebClient(); wc.DownloadProgressChanged += new…
Alaa Alrifaie
  • 49
  • 1
  • 5
0
votes
1 answer

Handling Pause/Resume and Using Notifications in Android (with AndEngine)

In the Android game I am working on, the game is killed by android while in the background. The game is built using AndEngine, so it takes place all within a single OpenGL activity, which moves between menus and the game using scenes. I am looking…
Tom
  • 51
  • 7
0
votes
2 answers

How to check HomeButton Click or Google Advertisement is click by user?

Any One help me for Provide Exit message to User when User click on Home Button? I used onPause() method but the Problem is that when User click on google ad then onPause method is called and Message is display to User. Thanks.
patel
  • 830
  • 1
  • 11
  • 26
0
votes
2 answers

Android Beginner Save/Load small information

I am looking to save/load a very easy application in android. The thought would be checking if a file exists in the onCreate() method and if it does load the settings in onCreate. Is this the right function to do this in? Saving is done in the…
Adrian Jandl
  • 2,985
  • 4
  • 23
  • 30
0
votes
1 answer

Identifying NEXT activity in onPause()

Is there any way to identify what the next activity is going to be when onPause() is invoked. I need to know because when the next activity is not one from my own application then I need to perform certain clean up that I don't want to perform when…
theblitz
  • 6,683
  • 16
  • 60
  • 114
0
votes
0 answers

onPause: count increases by 2

I have a score system that counts how much question I answered in my quiz app. In onPause(), I write the count of played questions in database. @Override protected void onPause(){ super.onPause(); SpielDBOpenHandler sdb = new…
user896692
  • 2,351
  • 7
  • 36
  • 57
0
votes
2 answers

Android: Using onPause() Selectively

I have a single activity timer application in which I have overridden the onPause() method to pause the timer when the user presses the home or back button. However, I would like the timer to keep moving in the case that the user manually turns off…
John Roberts
  • 5,885
  • 21
  • 70
  • 124