diff --git a/de.wwu.md2.framework/src/de/wwu/md2/framework/generator/android/wearable/controller/ApplicationGen.xtend b/de.wwu.md2.framework/src/de/wwu/md2/framework/generator/android/wearable/controller/ApplicationGen.xtend index 7f246d21..7fabd2ee 100644 --- a/de.wwu.md2.framework/src/de/wwu/md2/framework/generator/android/wearable/controller/ApplicationGen.xtend +++ b/de.wwu.md2.framework/src/de/wwu/md2/framework/generator/android/wearable/controller/ApplicationGen.xtend @@ -18,6 +18,8 @@ class ApplicationGen { import «Settings.MD2LIBRARY_TASKQUEUE_PACKAGE_NAME»; import «Settings.MD2LIBRARY_VIEWMANAGER_PACKAGE_NAME»; import «Settings.MD2LIBRARY_WIDGETREGISTRY_PACKAGE_NAME»; + import «Settings.MD2LIBRARY_PACKAGE»model.contentProvider.implementation.Polling; + public class «app.name.toFirstUpper» extends Application { @@ -40,6 +42,9 @@ class ApplicationGen { wr = Md2WidgetRegistry.getInstance(); context = getApplicationContext(); Controller.getInstance().run(); + Thread t = new Thread(new Polling(cpr)); + t.start(); + } public static Context getAppContext() { diff --git a/de.wwu.md2.framework/src/de/wwu/md2/framework/generator/android/wearable/model/ContentProviderGen.xtend b/de.wwu.md2.framework/src/de/wwu/md2/framework/generator/android/wearable/model/ContentProviderGen.xtend index 71436939..509e7a5b 100644 --- a/de.wwu.md2.framework/src/de/wwu/md2/framework/generator/android/wearable/model/ContentProviderGen.xtend +++ b/de.wwu.md2.framework/src/de/wwu/md2/framework/generator/android/wearable/model/ContentProviderGen.xtend @@ -249,8 +249,11 @@ import «Settings.MD2LIBRARY_PACKAGE»controller.eventhandler.implementation.Md2 public void newEntity(){ content = new «(content.entity as Entity).name»(); } - + public void update() { + System.out.println("single wurde geupdated"); + } } + '''} @@ -319,7 +322,10 @@ import de.uni_muenster.wi.md2library.model.contentProvider.implementation.Abstra } } - } + public void update() { + System.out.println("multi wurde geupdated"); + } + ''' }