I am working on open source (droidwall plugin) and I am stuck in one of the problems: iptables rules did not apply properly when the system reboots. It works great on most versions of Android. But on some specific ROMS (CM 10.1) it gives the following logcat
12-26 08:39:27.116 I/ActivityManager(582): No longer want dev.ukanth.ufirewall (pid 2297): empty
My code works something like below
private Handler mHandler = new Handler(Looper.getMainLooper()); @Override public void onReceive(final Context context, final Intent intent) { if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) { if (Api.isEnabled(context.getApplicationContext())) { final Handler toaster = new Handler() { public void handleMessage(Message msg) { if (msg.arg1 != 0) Toast.makeText(context, msg.arg1, Toast.LENGTH_SHORT).show(); } }; mHandler.post(
You can find my Api.java class here .
ukanth
source share