Heyya! I come from Java, so I likely suck at Monkey C for the moment. I've been trying to learn it for a few days now, but the rendering still has me stumped -
File: <app>App.mc
import Toybox.Application;
import Toybox.Lang;
import Toybox.Media;
import Toybox.WatchUi;
import Toybox.Graphics;
import Toybox.Communications;
class :APP:App extends Application.AudioContentProviderApp{ // :APP: is a placeholder //
function initialize(){
var kacID = "redacted";
var kacSecret = "redacted";
AudioContentProviderApp.initialize();
}
// Calls Kerror.mc when program loads
function onStart(state as Dictionary?) as Void{
return new Kerror();
}
/*
... more
*/
}
File: Kerror.mc
import Toybox.Graphics;
import Toybox.WatchUi;
class Kerror extends WatchUi.View{
function initialize(){
WatchUi.View.initialize();
}
function onUpdate(dc){
dc.setColor(Graphics.COLOR_DK_GREEN, Graphics.COLOR_DK_GREEN);
dc.clear();
dc.drawText(132, 100, Graphics.FONT_SMALL, "asdasd", Graphics.TEXT_JUSTIFY_CENTER);
}
}
By default, Music Provider Apps display the text "No Media" with a black backdrop, but all of my attempts to draw something else have either had no effect, or turned the screen white and unresponsive.
What am I doing wrong?
