Android examples for Android OS:Message
signal Int via OS Message
//package com.java2s; import android.os.Bundle; import android.os.Handler; import android.os.Message; public class Main { public static void signalInt(Handler handler, String key, int i) { if (handler != null && key != null && !key.equals("")) { Message msg = handler.obtainMessage(); Bundle b = new Bundle(); b.putInt(key, i);/*from w ww. j a va 2s . co m*/ msg.setData(b); handler.sendMessage(msg); } } }