@Override
public void onReceive(Context context, Intent intent) {
if("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
- Intent debouncesvc = new Intent(context, DebounceService.class);
- context.startService(debouncesvc);
+ DebounceModuleHelper module = new DebounceModuleHelper(context);
+
+ if (module.get_on_boot() && module.is_safe_to_load()) {
+ module.loadModule();
+ }
}
}
}