SureFox uses a BroadcastReceiver to allow 3rd party applications to send specific commands to SureFox. Command can be send using Intent. (See examples below). To execute any command Administrator password is necessary.
Currently, SureFox supports the following commands:
Launch_surefox
final Intent intent = new Intent("com.gears42.surefox.COMMUNICATOR"); intent.putExtra("command","launch_surefox"); intent.putExtra("sender", context.getPackageName()); //optional this.sendBroadcast(intent);
Exit_Surefox
final Intent intent = new Intent("com.gears42.surefox.COMMUNICATOR"); intent.putExtra("command","exit_surefox"); intent.putExtra("sender", context.getPackageName()); //optional intent.putExtra("password", "surefoxPassword"); this.sendBroadcast(intent);
apply_settings
final Intent intent = new Intent("com.gears42.surefox.COMMUNICATOR"); intent.putExtra("command","apply_settings"); intent.putExtra("sender", context.getPackageName()); //optional intent.putExtra("password", "surefoxPassword"); intent.putExtra("setting_xml", "pathToSureFoxSettingsFile"); context.sendBroadcast(intent);
force_apply_settings
final Intent intent = new Intent("com.gears42.surefox.COMMUNICATOR"); intent.putExtra("command","force_apply_settings"); intent.putExtra("sender", context.getPackageName()); // optional intent.putExtra("password", "surefoxPassword"); intent.putExtra("settings_path", "pathToSureFoxSettingsFile"); context.sendBroadcast(intent);
change_password
final Intent intent = new Intent("com.gears42.surefox.COMMUNICATOR"); intent.putExtra("command","change_password"); intent.putExtra("sender", context.getPackageName()); // optional intent.putExtra("password", "surefoxPassword"); intent.putExtra("new_password", "newsurefoxPassword"); context.sendBroadcast(intent);
You can also send SureFox commands from Command Line Interface:
launch SureFox
am broadcast -a com.gears42.surefox.COMMUNICATOR -e "password" "0000" -e "command" "launch_surefox" com.gears42.surefox
exit SureFox
am broadcast -a com.gears42.surefox.COMMUNICATOR -e "password" "0000" -e "command" "exit_surefox" com.gears42.surefox
change_password
am broadcast -a com.gears42.surefox.COMMUNICATOR -e "command" "change_password" -e "password" "0000" -e "new_password" "1111" com.gears42.surefox
apply Settings
am broadcast -a com.gears42.surefox.COMMUNICATOR -e "command" "apply_settings" -e "password" "0000" -e "settings_xml" "SureFox_Settings_XML_Data" com.gears42.surefox
force_apply Settings
am broadcast -a com.gears42.surefox.COMMUNICATOR -e "command" "force_apply_settings" -e "password" "0000" -e "settings_path" "/sdcard/SureFox.settings"com.gears42.surefox
To download free trial of SureFox for Android, click here.
Was this helpful?
YesNo