1

Communication from Services to Activity using Messenger

view story
linux-howto

http://stackoverflow.com – I have been programming in Android for a month now. But I have used only Activities in all my sample apps. Recently, I tried to use a service to update my progress bar. Following is my code:- private Context context; private Messenger mService = null; private ProgressBar bar; private boolean mBound = false; private Handler handler = new Handler(){ public void HandleMessage(Message msg){ Log.d("com.example.nd","Handling message"); bar.setProgress(msg.arg1); } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); (HowTos)