I'm trying to make a "widget" with a glance.
(:glance)
class MyWidgetApp extends Application.AppBase {
function initialize() {
AppBase.initialize();
}
function getGlancelView() as [ GlanceView ] or [ GlanceView, GlanceViewDelegate ] or Null {
return [ new MyGlanceView() ];
}
function getGlanceTheme() as AppBase.GlanceTheme {
return AppBase.GLANCE_THEME_DEFAULT;
}
// Return the initial view of your application here
function getInitialView() as [Views] or [Views, InputDelegates] {
return [ new MyWidgetView() ];
}
}
(:glance)
class MyGlanceView extends WatchUi.GlanceView {
function initialize() {
GlanceView.initialize();
System.println("MyGlanceView");
}
function onUpdate(dc as Dc) as Void {
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
dc.clear();
dc.drawText(dc.getWidth() / 2, dc.getHeight() / 2, Graphics.FONT_SMALL, "glance test", Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER);
}
}
(:glance)
class MyWidgetView extends WatchUi.View {
function initialize() {
View.initialize();
System.println("MyWidgetView");
}
function onUpdate(dc as Dc) as Void {
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
dc.clear();
dc.drawText(dc.getWidth() / 2, dc.getHeight() / 2, Graphics.FONT_SMALL, "widget test", Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER);
}
}
In the manifest I tried it both as Widget and as WatchApp, minApiLevel: 3.2.0.
I tried it in SDK 8.3.0 and 8.4.0 on fr955.
No matter what I do the Settings > Glance Launch Mode is grayed out and of course getGlanceView is never called.
What should I do to be able to debug my glance view in the simulator?