Questions tagged [postdelayed]
176 questions
0
votes
2 answers
Automatically Redirecting Activity in Android
I want to create a application where I can redirect from one activity to another activity automatically.
When I come back to first activity it shall redirect 1st activity to 2nd again.
Example:
act1--->act2(automatically)--->ac3--->ect....
Now using…
user4417277
0
votes
1 answer
Reusing Runnable for handler.postDelayed()
I am trying to avoid garbage creation by reusing runnable. However, I am stuck on how to implement this correctly.
Here is my runnable wrapper class:
public class RotateRunnable implements Runnable {
Maze maze;
int i;
int steps;
…

mrQWERTY
- 4,039
- 13
- 43
- 91
0
votes
1 answer
Handler postDelay() leading unexpected variable changes
I am working on a game and I am using postDelay() to make the animations smoother. A problem I am running into is that if I execute the method with postDelay() in it, the variables that the method operates on no longer gets changed in unexpected…

Ansdai
- 47
- 9
0
votes
0 answers
HttpRequest handle time delay between POST response and GET request Http
I am working on an application which require following step to acquire data
Step 1: Post a request to Http server using POST method which will send a part link in response.
Step 2: Construct a full URL suing the response part link and request to…

Julian
- 33
- 2
- 8
0
votes
1 answer
PostDelayed not works correctly
I used postDelayed for delaying dynamic duration.
And I found it did not work correctly.
Here is my source code.
public Runnable service = new Runnable() {
public void run() {
endTimeHere = System.currentTimeMillis();
…

iscnorthwind
- 143
- 1
- 9
0
votes
2 answers
Delaying Tasks in a method in Android
I have a robot that I want to control via bluetooth. I write on bluetooth socket asking the robot to move, if the robot reads my message sucessfully, it will send me a signal back saying that "I read you!". The problem is that it takes 3 seconds for…

Kasra
- 3,045
- 3
- 17
- 34
0
votes
1 answer
Andengine - handler.postDelayed doesn't work
I want to do a simple action in my game after one second. I have my GameScene class which extends Andengine's Scene.
public class GameScene extends Scene{
//(...)
Handler delayHandler;
public GameScene(){
Looper.prepare();
…

Zuku
- 1,030
- 13
- 21
0
votes
1 answer
handler.postDelayed in custom alert crashes my app
I have a custom alert.
I made a custom layout for it and a class that extends Dialog where i have several functions defining alert's behavior.
I call that custom alert from an activity, by clicking on a button.
Everything works fine until I want to…

SteBra
- 4,188
- 6
- 37
- 68
0
votes
1 answer
Interrupt a postdelayed from a handler inside a OnCompletionListener
I have several different Activitys each with a MediaPlayer and a OnCompletionListener to start other activities after the current file has stopped playing. There also is a delay built in the OnCompletion Listener which i achieve through a Handler…

Flo
- 325
- 2
- 6
- 18
0
votes
1 answer
android handler for successive delays
Im writing an application to read a line of text, highlighting each word successively as the line is read. The idea is to start playing the line (it's a picture book for kids, so one line at a time), then read the text, the length of each word in…

dulciepercy
- 103
- 4
0
votes
2 answers
Simple Runnable experiment Works on AVD but not on hardware device
I'm a beginner at both Android Development and StackOverflow so please don't shoot me if I step on any toes !
I am trying to get a simple app working where a user pushes a button and a displayed integer increments while the button is held down, and…

Jay Long
- 3
- 2
0
votes
1 answer
postDelayed() not woking properly
i want a number of images to be set as background one after another every few seconds.
i asked how to do this and i got to know i should use handler().postDelayed() to perform that.
i used to following code to implement what i wanted but it didnot…

Akshay Sethi
- 803
- 3
- 13
- 22
0
votes
2 answers
Objective C - SLComposeViewController delayed presention
I've been doing a program which takes care of posting a picture or words (or both) to both facebook and twitter. But I want to do them both at the same time, so I wrote my code like this:
//POST TO FACEBOOK
if ([SLComposeViewController…

gfcf14
- 316
- 4
- 30
0
votes
1 answer
Runnable and postdelayed in android 4.0 (GraphView Library for real time)
Im using the GraphView Library to visualize real time graphs. The library example works fine in 2.X android devices, however it doesnt work properly in 4.X devices. The graph only get refreshed when I click the screen. Im newbie in Android but I…

Rafag
- 719
- 3
- 11
- 27
0
votes
1 answer
Why doesn't this postDelayed run forever?
This is my code, but in theory it should keep posting this log message every second until forever, but it doesn't. Any ideas? My goal is to have it run forever, but a while loop also doesn't work.
import android.app.Activity;
import…

EGHDK
- 17,818
- 45
- 129
- 204