In the Observer pattern, an event handler is the function or method called on an observer listening for an event dispatched by the subject. Also known as an event listener.
Questions tagged [handler]
3718 questions
1
vote
1 answer
Executing thread only in one Android Activity
I have three java files in my Android project. Two are activities (MainActivity and GeoActivity) and one is a plain java file (PostHttp -> sends data to server via the HTTP POST)
I switch over to GeoActivity via a simple button on-click method.…

stud91
- 1,854
- 6
- 31
- 56
1
vote
1 answer
Android handler and thread mechanism
I am working with threads and handlers on android and I am a beginner on this.
Actually, there is something that is not clear yet for me: does the handler method
void handleMessage(Message msg)"
always runs in the UI thread?
In fact, in the…

user3640048
- 41
- 5
1
vote
1 answer
IPropertyStore interface not called in a property handler
I am developing a property handler implementing IPropertyStore and IInitializeWithFile, testing on Win 8.1 x64. Property names were previously added to the system using a .propdesc file properly registered using prop.exe.
I used PROCMON.EXE to…

user3630200
- 31
- 2
1
vote
0 answers
Android: Progress bar that shows a countdown?
I a currently using a new thread to create a UI thread and then displaying a progress bar. Can someone tell me how to do the same for a thirty second progress dialog (should do some work and disappear after this duration) that can be done using a…

Legend
- 113,822
- 119
- 272
- 400
1
vote
1 answer
android.view.View.requestLayout(View.java:16431)
We're working in an android app with the 4 version and we need a mysql connection. We are doing this with a php file which returns the data base result. The following code are working because if we debug the project we can see the correct database…

Soft Line
- 37
- 1
- 9
1
vote
0 answers
SIGPIPE signal handling
I'm trying to figure out how does a pipe communication between two related processes work, so I wrote this simple C program.
#define READ 0
#define WRITE 1
char* phrase = "This is a message!!!";
char* phrase2 = "This is a second…

88mdil
- 43
- 1
- 8
1
vote
1 answer
Will an infinite loop via handler block the UI thread?
I want to implement a timer in my android game using following code. This code runs certain code after every second.
final Handler handler = new Handler();
Runnable runable = new Runnable() {
@Override
public void run() {
…

user3293494
- 609
- 1
- 9
- 21
1
vote
1 answer
Is it possible to attach handler to a system timer?
I want to register handler for the following event: "system clock timer incremented second counter". Is it possible to attach handler for this event? In the other words I want to call an appropriate function every second. It seems that the following…
user2953119
1
vote
1 answer
WP8 Tap event handling in c#
I've added some UIelements (buttons) programatically to my application interface and i'd like to handle tap events.
I would have done it in my xaml file with
How could I do it in C# ? I don't know how i shall use…

Vincent Monteil
- 568
- 5
- 22
1
vote
1 answer
GCMIntentService throwing a "Sending message to a Handler on a dead thread" error
So most of the question is in the title.
I've already set up everything in GCMIntentService to do a sendbroadcast(intent) in one function. But when I try to do it in another one I get this error "Sending message to a Handler on a dead thread". Code…

Fanta1090
- 41
- 8
1
vote
4 answers
Is not possible to acess a class variable inside a handler?
I have a global boolean variable on my class, and also i have a handler on my class. I want that the handler does some code only when that variable of the class is true, but it is not working, because for the handler that variable is ALWAYS false. I…

NullPointerException
- 36,107
- 79
- 222
- 382
1
vote
1 answer
Android Handler after resume behavior
I have an Android app which receives messages via Bluetooth (but that part is not relevant here). The messges are received by a handler. When starting the app after it has been killed by the Android task manager it works as it should. If I don't…

AndyAndroid
- 4,039
- 14
- 44
- 71
1
vote
0 answers
java.lang.RuntimeException: Handler sending message to a Handler on a dead thread
I'm using Google Cloud Message to send a message to my phone from a server. When I include Toast.makeText() inside of onHandleIntent, it gave me an handler error:
java.lang.RuntimeException: Handler (android.os.Handler) sending message to a Handler…

SPARK
- 61
- 5
1
vote
1 answer
JQuery : call a function with a String Variable
I'm creating a JQuery plugin which takes in parameter a String : handler.
Depending on that, my plugin will be launched.
Example if : "handler = submit"
In my plugin I'll call :
$("form").submit(function() {
// Code inside
});
With handler =…

Zero
- 443
- 1
- 7
- 23
1
vote
1 answer
Capturing Stack Trace with CXF Handler
I have not been able getting CXF 2.7.x's Handlers to work with WebSphere v7 (web services without Handlers do work accordingly), however, I wanted to know whether it is possible to access the stack trace, if thrown by a web service, via CXF's…

Malvon
- 1,591
- 3
- 19
- 42