Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

display.autoOff is not working

I developed a Football Judge app and i want to keep the display on.
Here is my code sapmle how I used it.
Maybe I did something wrong, but it doesn't work.

After 13 seconds the display gets black. The timer is still running.

import document from "document";
import {display} from  "display"
let demotext = document.getElementById("demotext");
demotext.text = "Fitbit Studio rocks!";
var idx = 0;
internalID = setInterval (updateDisplay, 1000);
display.autoOff =  state.autoOff; //could also be false
display.on = true;
function updateDisplay() {
  demotext.text = idx;
  idx++;
}


 

Best Answer
0 Votes
10 REPLIES 10

Could this be the issue?

Starting with SDK version 4.0, on devices with AMOLED (active-matrix organic light-emitting diode) displays, this property will always be set to true. Any attempt to modify it will be ignored by the system and a message will be printed in the developer console.

 

Peter McLennan
Gondwana Software
Best Answer
0 Votes

So if I understand this correct, I'm not able to develop an application with always on display because it has been allowed by fitbit.
And its also not possible to develop this application and sideload it to the watch to test it if its working as expected.

Best Answer
0 Votes

If you're trying to use a device with AOD, then yes: publishing AOD is by invitation only. Even AOD-approved developers can't sideload AOD apps for testing.

AOD might not have helped you anyway, since there are strict constraints about what can be displayed in AOD mode. It's not the same as setting autoOff to false.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

So is it possible to prevent versa 2 and 3 by executing an app to disable the display an other way to set it to on every update?

It looks .... and there ist also a second where the display is black.
It's a judge app and it's necessary to start and stop the playclock without activating the display first.

Best Answer
0 Votes

Not sure what you mean. If you try to get an AMOLED display to display a lot of stuff continually, you'll physically damage the display. Under what circumstances do you want your app to be on-screen?

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I don't want to demage the display at all and I did not realy knew that this could be done.

During the first games the judges noticed that the display did not always turned on when it was necessary and an extra touch to the display was necessary and so one or two seconds where lost befor stopping the playclock. So I tried to activate the display all the time. But it was not possible.

Befor they used pebbles and there it was no problem, but they are not available any more. So my niece whitch is a american footbal judge asked me if it's possible to develop a judge app for a fitbit.

So it's also not a good idea to turn on the display every time it gets deactivated.

 

Best Answer
0 Votes

Turning the display on whenever it gets deactivated would be a bad idea.

 

You could try to buy some non-AMOLED Fitbits. They should be getting cheaper now that Versa 3 is out. You'll still have a problem in future, though.

 

The display can always be turned on by pressing the button on the side.

 

AOD mightn't help you much in this situation, anyway. When an app is in AOD mode, I don't think it's responsive to screen touches. A screen touch is captured by the operating system and just takes your app out of AOD mode.

 

Just don't over-use display.poke() or Bad Things will happen.

 

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Thanks for your help.

I'll discus this with my  niece what's the best solution for her needs.
Maybe we can solve this by an other concept of designing the app.

Best Answer
0 Votes

Could you use the  poke() function to reset the display timeout timer?

 

import { display } from "display";

...

display.poke();

Best Answer
0 Votes

For a while, until screen damage occurs.

Peter McLennan
Gondwana Software
Best Answer
0 Votes