Black screen on app launch

Hi Devs !

I've been working on this for hours and can't figure out a way out ...

I'm developping an app (improved watchface with some webrequests). All is fine on the sim, grab of info and display are working just fine but once the app is installed and run on the watch, I only get black screen. No IQ! nor other debug info.

App is made of the app istelf, a background service (to trigger the webrequest every 10 mn), a view and the webrequest part.

Any help would be very much appreciated.

Ced 

  • This code has been tested and runs on CIQ 1 through 4 MIP devices without issue. Yes, I have different calls for different buffers based on the device API level.

  • What are you using for a palette in the buffered bit map vs the colors you use on AMOLED?

  • System palette, no palette specified because that breaks anti-aliasing.

  • Figured it out. It's the combination of amoled devices having buffers and not having partial update. All MIP devices with buffers have partial update (as far as I know), so that's where the buffer write is. I just needed to add another test condition to allow amoled devices to also run onPartialUpdate from onUpdate.

  • Application.Storage.setValue() working on sim but showing "null" on watch ... More precisely, info is not updated on watch but is on sim
  • dataToParse = Application.Storage.getValue("dataToParse");
    //System.println("data onUpdate is : " + dataToParse);
    var myDatatext ="";
    try {
    var myHydratationString = Lang.format("$1$", [dataToParse["Hydratation"].format("%4i")]);
    var myHydratationGoalString = Lang.format("$1$", [dataToParse["HydratationGoal"].format("%4i")]);
    var mySleepScoreString = Lang.format("$1$", [dataToParse["SleepScore"].format("%2i")]);
    var myStressAvValueString = Lang.format("$1$", [dataToParse["StressAvValue"].format("%2i")]);
    var myVO2MaxValueString = dataToParse["VO2MaxValue"];

    if (myVO2MaxValueString instanceof Toybox.Lang.Float) {
    myVO2MaxValueString = Lang.format("$1$", [dataToParse["VO2MaxValue"].format("%2i")]);
    }
    else {
    myVO2MaxValueString = "---";
    }

    myDatatext = myHydratationString + " / " + myHydratationGoalString + " " + mySleepScoreString + " " + myStressAvValueString + " " + myVO2MaxValueString;
    //System.println(myDatatext);
    }
    catch(ex){}

    dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);

    dc.drawText(200, 140, Graphics.FONT_XTINY, myDatatext, Graphics.TEXT_JUSTIFY_CENTER);

    Does work perfectly on the simultor but not on the watch itself (myDatatext remains "" whereas it should be updated with new value and displayed as such). Any idea ?

  • dataToParse = Application.Storage.getValue("dataToParse");
    //System.println("data onUpdate is : " + dataToParse);
    var myDatatext ="";
    try {
    var myHydratationString = Lang.format("$1$", [dataToParse["Hydratation"].format("%4i")]);
    var myHydratationGoalString = Lang.format("$1$", [dataToParse["HydratationGoal"].format("%4i")]);
    var mySleepScoreString = Lang.format("$1$", [dataToParse["SleepScore"].format("%2i")]);
    var myStressAvValueString = Lang.format("$1$", [dataToParse["StressAvValue"].format("%2i")]);
    var myVO2MaxValueString = dataToParse["VO2MaxValue"];

    if (myVO2MaxValueString instanceof Toybox.Lang.Float) {
    myVO2MaxValueString = Lang.format("$1$", [dataToParse["VO2MaxValue"].format("%2i")]);
    }
    else {
    myVO2MaxValueString = "---";
    }

    myDatatext = myHydratationString + " / " + myHydratationGoalString + " " + mySleepScoreString + " " + myStressAvValueString + " " + myVO2MaxValueString;
    //System.println(myDatatext);
    }
    catch(ex){}

    dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);

    dc.drawText(200, 140, Graphics.FONT_XTINY, myDatatext, Graphics.TEXT_JUSTIFY_CENTER);

    Does work perfectly on the simultor but not on the watch itself (myDatatext remains "" whereas it should be updated with new value and displayed as such). Any idea ?

    Does the application need a specific authorization to get access to the persistent storage ?