case SCREENCAP:
Utils.sendMessage(context, replyTo, screencap_help);
break;
+ case TORCH:
+ Utils.sendMessage(context, replyTo, torch_help);
+ break;
}
}
public static void screencap(final Context context, final Address replyTo, final String filename){
new Thread(new ScreencapRunnable(context, replyTo, filename)).start();
}
+
+ /**
+ * Toggle the torch state using the Torch (net.cactii.torch2) app.
+ *
+ * @param context Context instance
+ * @param replyTo reply Address
+ */
+ public static void torch(final Context context, final Address replyTo){
+ context.sendBroadcast(new Intent("net.cactii.flash2.TOGGLE_FLASHLIGHT"));
+ Utils.sendMessage(context, replyTo, toggling_torch_state);
+ }
}