import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;
+import android.widget.TextView;
public class MS2Debounce extends Activity
{
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
+ @Override
+ public void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
- Intent debouncesvc = new Intent(this, DebounceService.class);
- startService(debouncesvc);
+ DebounceModuleHelper module = new DebounceModuleHelper(this);
- setContentView(R.layout.main);
- }
+ if (!module.isLoaded()) {
+ module.loadModule();
+ }
+
+ setContentView(R.layout.main);
+
+ TextView text = (TextView)findViewById(R.id.text);
+ text.setText("You will soon be able to set the debounce_delay here.\nModule loaded: " + module.isLoaded() + "\ndebounce_delay: " + module.getDelay() + "ms\nsafe_to_load: " + module.is_safe_to_load());
+ }
}