forked from hussien89aa/AndroidTutorialForBeginners
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhandle.java
More file actions
Latest commit
26 lines (23 loc) · 809 Bytes
/
Copy pathhandle.java
File metadata and controls
26 lines (23 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
myhandlerhandler =newmyhandler();
// Create Inner Thread Class
classbackgroundextendsThread
{
publicvoidrun()
{
MessagemsgObj = handler.obtainMessage();
Bundleb = newBundle();
b.putString("message", msg);
msgObj.setData(b);
handler.sendMessage(msgObj);
}
}
// Define the Handler that receives messages from the thread and update the progress
classmyhandlerextendsHandler {
publicvoidhandleMessage(Messagemsg) {
if ((null != msg))
StringaResponse = msg.getData().getString("message");
}
}