Hi,
I am playing with the Widget clock from the tutorial:
https://www.b4x.com/android/forum/t...widget-more-frequently-than-30-minutes.11329/
It works ok from the sample code but I get a warning in the log:
So I updated the Manifest to:
Now the Widget displays but does not get updated. I added some logging to the code and I see that the line 'StartServiceAt......' is called but the service never gets restarted.
Here is my log from the working widget with the following in the manifest '<uses-sdk android:minSdkVersion="4"/>':
And here is the log from the Widget that does not get updated with the manifest '<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>':
I am playing with the Widget clock from the tutorial:
https://www.b4x.com/android/forum/t...widget-more-frequently-than-30-minutes.11329/
It works ok from the sample code but I get a warning in the log:
The recommended value for android:targetSdkVersion is 29 or above (manifest editor). (warning #31)
So I updated the Manifest to:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>
Now the Widget displays but does not get updated. I added some logging to the code and I see that the line 'StartServiceAt......' is called but the service never gets restarted.
Here is my log from the working widget with the following in the manifest '<uses-sdk android:minSdkVersion="4"/>':
Logger connected to: Xiaomi Redmi Note 9 Pro
--------- beginning of main
** Receiver (widget2x1) OnReceive **
*** Service (widget2x1) Create ***
** Service (widget2x1) Start **
Service started in foreground mode.
Call to Service_Start:android.appwidget.action.APPWIDGET_ENABLED
Startservice:1604033520000
** Receiver (widget2x1) OnReceive **
** Service (widget2x1) Start **
Service started in foreground mode.
Call to Service_Start:android.appwidget.action.APPWIDGET_UPDATE
Startservice:1604033520000
** Receiver (widget2x1) OnReceive **
** Service (widget2x1) Start **
Service started in foreground mode.
Call to Service_Start:android.appwidget.action.APPWIDGET_UPDATE_OPTIONS
Startservice:1604033520000
** Receiver (widget2x1) OnReceive **
** Service (widget2x1) Start **
Service started in foreground mode.
Call to Service_Start:
Startservice:1604033580000
** Receiver (widget2x1) OnReceive **
** Service (widget2x1) Start **
Service started in foreground mode.
Call to Service_Start:
Startservice:1604033640000
And here is the log from the Widget that does not get updated with the manifest '<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>':
Logger connected to: Xiaomi Redmi Note 9 Pro
--------- beginning of main
** Receiver (widget2x1) OnReceive **
*** Service (widget2x1) Create ***
** Service (widget2x1) Start **
Service started in foreground mode.
Call to Service_Start:android.appwidget.action.APPWIDGET_ENABLED
Startservice:1604032800000
** Receiver (widget2x1) OnReceive **
** Service (widget2x1) Start **
Service started in foreground mode.
Call to Service_Start:android.appwidget.action.APPWIDGET_UPDATE
Startservice:1604032800000
** Receiver (widget2x1) OnReceive **
** Service (widget2x1) Start **
Service started in foreground mode.
Call to Service_Start:android.appwidget.action.APPWIDGET_UPDATE_OPTIONS
Startservice:1604032800000