AutomationPlugin
This commit is contained in:
parent
9a96d29dc3
commit
d317ec94ad
|
@ -75,6 +75,7 @@ import info.nightscout.androidaps.plugins.Source.SourceXdripPlugin;
|
|||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.plugins.Wear.WearPlugin;
|
||||
import info.nightscout.androidaps.plugins.XDripStatusline.StatuslinePlugin;
|
||||
import info.nightscout.androidaps.plugins.general.automation.AutomationPlugin;
|
||||
import info.nightscout.androidaps.receivers.DataReceiver;
|
||||
import info.nightscout.androidaps.receivers.KeepAliveReceiver;
|
||||
import info.nightscout.androidaps.receivers.NSAlarmReceiver;
|
||||
|
@ -187,6 +188,7 @@ public class MainApp extends Application {
|
|||
pluginsList.add(PersistentNotificationPlugin.getPlugin());
|
||||
pluginsList.add(NSClientPlugin.getPlugin());
|
||||
pluginsList.add(MaintenancePlugin.initPlugin(this));
|
||||
pluginsList.add(AutomationPlugin.getPlugin());
|
||||
|
||||
pluginsList.add(ConfigBuilderPlugin.getPlugin());
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package info.nightscout.androidaps.plugins.general.automation;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.plugins.Common.SubscriberFragment;
|
||||
|
||||
public class AutomationFragment extends SubscriberFragment {
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.automation_fragment, container, false);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateGUI() {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package info.nightscout.androidaps.plugins.general.automation;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
|
||||
public class AutomationPlugin extends PluginBase {
|
||||
|
||||
static AutomationPlugin plugin = null;
|
||||
|
||||
public static AutomationPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new AutomationPlugin();
|
||||
return plugin;
|
||||
}
|
||||
|
||||
private AutomationPlugin() {
|
||||
super(new PluginDescription()
|
||||
.mainType(PluginType.GENERAL)
|
||||
.fragmentClass(AutomationFragment.class.getName())
|
||||
.pluginName(R.string.automation)
|
||||
.shortName(R.string.automation_short)
|
||||
.preferencesId(R.xml.pref_safety)
|
||||
.description(R.string.automation_description)
|
||||
);
|
||||
}
|
||||
}
|
9
app/src/main/res/layout/automation_fragment.xml
Normal file
9
app/src/main/res/layout/automation_fragment.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
tools:context="info.nightscout.androidaps.plugins.general.automation.AutomationFragment">
|
||||
|
||||
|
||||
</FrameLayout>
|
|
@ -1205,6 +1205,9 @@
|
|||
<string name="loop_openmode_min_change">Minimal request change [%]</string>
|
||||
<string name="loop_openmode_min_change_summary">Loop will popup new change request only if change is bigger than this value. Default value is 20%</string>
|
||||
<string name="key_short_tabtitles" translatable="false">short_tabtitles</string>
|
||||
<string name="automation">Automation</string>
|
||||
<string name="automation_short">Auto</string>
|
||||
<string name="automation_description">User defined automation tasks</string>
|
||||
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d day</item>
|
||||
|
|
Loading…
Reference in a new issue