android - Making changes to Main Activity UI from thread in Service -
I'm looking for some good documents or a good example of this for some time from the worker thread in my service There is a change in your main activity UI which is going on in the background, as far as I think I think I'm supposed to work with some type of handler, but I'm not sure how to contact it Go.
Do anyone have any ideas or good examples that they can direct me to? The UI Elements I am changing is a TextView that informs the user about the status of the thread.
Thank you for your help
 You just have a   and then pass it through your service. You can do a function in the service like this:    and then pass the handler in such a way:    To send a message back then:   handler on the theater  to make:   Private Handler Service Handler = New Handler () {@ Override Public Wind Handmess (Message Message) {someFunctionInTheUIThread (); }};    
 public void registerHandler (handler service handler) {Handler = serviceHandler; }    
 theservice = ((local billing service)) .getService (); TheService.registerHandler (serviceHandler);    
 Message msg = handler. Shareman (identifier, "message or data"); Handler.sendMessage (MSG);    
 
  
Comments
Post a Comment