Energy mode of F6 series stops backgrounding

Hi,

I thought it already since my battery widget starts every 5 minutes in the background to check charging. If the plug is removed, the charging time is stored and given to the main app as soon as the widget is started. Sometimes this recognition didn't work for some reason.

I now wrote a background widget which starts in the background every hour and increments a counter. As soon as the main app is started, the counter is shown. 

I double checked it yesterday during the day and the counter incremented properly during the day. Also it has shown incremented values after the energy mode was started. But in the morning after the energy mode did end, the counter was not incremented but showed zero. The backgrounding incremented was nulled.

This is probably the reason, why the charging detection wasn't passed correctly to the main app in my battery widget.

Is this a bug?

Here is my code:

using Toybox.Application;

var howOften;

(:background)
class BackgroundWidgetApp extends Application.AppBase {

    function initialize() {
        AppBase.initialize();
    	howOften = 0;
    }

    // onStart() is called on application start up
    function onStart(state) {
    }

    // onStop() is called when your application is exiting
    function onStop(state) {
    }

    // Return the initial view of your application here
    function getInitialView() {
    	Background.registerForTemporalEvent(new Time.Duration(3600));
        return [ new BackgroundWidgetView() ];
    }

    function onBackgroundData(data) {
    	System.println("onBackgroundData(data) is called");
    	howOften = data;
    } 


    function getServiceDelegate(){
    	//System.println("getServiceDelegate() is called");
        return [new BgbgServiceDelegate()];
    }



}


using Toybox.Background;



(:background)
class BgbgServiceDelegate extends Toybox.System.ServiceDelegate {
	
	function initialize() {
		Sys.ServiceDelegate.initialize();
	}
	
    
	function onTemporalEvent() {
       	var data = Background.getBackgroundData();
		if (data == null) { data = 0; }
       	
       	data++;
       	
        Background.exit(data);
    }
    



}

using Toybox.WatchUi;

class BackgroundWidgetView extends WatchUi.View {

    function initialize() {
        View.initialize();
    }


    function onUpdate(dc) {
      	dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
		dc.clear();
      	dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);
      	dc.drawText(140, 140, Graphics.FONT_MEDIUM, howOften, Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER);
		
    }

 
}