protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
_connTypeKey = GetString(Resource.String.ConnectionType);
_connStringKey = GetString(Resource.String.ConnectionString);
var prefs = GetSharedPreferences("AutomationConfig", FileCreationMode.WorldWriteable);
// No connection type set, launch the config screen
if(!prefs.Contains(_connTypeKey))
{
StartActivity(typeof (ConfigActivity));
Finish();
return;
}
// Init device
_device = new AndroidDevice(this,
(ConnectionType) prefs.GetInt(_connTypeKey, (int)ConnectionType.Direct),
prefs.GetString(_connStringKey, ""));
// Make an automation thread, so it doesn't block UI
_autoThread = new Thread(_device.BeginAutomation);
}