Java tutorial
//package com.java2s; import android.content.Context; import android.content.Intent; public class Main { public static void setAppState(int i, Context context) { Intent stateUpdate = new Intent("com.quicinc.Trepn.UpdateAppState"); stateUpdate.putExtra("com.quicinc.Trepn.UpdateAppState.Value", i); context.sendBroadcast(stateUpdate); } }