Android Question My widget is not working properly

Leomar_NS

Member
Licensed User
Longtime User
I thought I had achieved 100% success in my first widget, but still have something that is not working properly:
When the widget is on the homescreen and I access some other app, to finalize the app and return to the homescreen, sometimes the widget is not properly filled with data and the image. I'm attaching the file widget: tempoService.bas. I ask please, if anyone can help me I would greatly appreciate it.
 

Attachments

  • tempoService.bas
    2.2 KB · Views: 137

Leomar_NS

Member
Licensed User
Longtime User
Thanks Erel,
"When the widget is on the homescreen and I access some other app, to finalize the app and return to the homescreen, sometimes the widget is not properly filled with data and the image."
The data fields and / or image of forescast disappear. So I need to click again on the location of the image so that everything is reloaded.
Sorry my bad english (via translate google)
 
Upvote 0

Leomar_NS

Member
Licensed User
Longtime User
Yes, Erel
I send my complete project.
Thanks for your attention.
 

Attachments

  • widget_001.zip
    9.6 KB · Views: 157
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Set #CanInstallToExternalSTorage to false. Widgets should be installed on the internal storeage.

I wasn't able to reproduce this issue, however I assume that at some point the process is killed and then when it is recreated it takes time until the data is downloaded again.

The solution is to save all the data in a file and load it in Service_Create.
 
Upvote 0

Leomar_NS

Member
Licensed User
Longtime User
Erel, thank you for your orientation.
I did what you suggested and it seems that all is well now.
 
Upvote 0

Leomar_NS

Member
Licensed User
Longtime User
Hi Erel, discovered by chance the main application that causes the problem in my widget. It's Facebook. When leaving the facebook widget is without visible data even after that change you suggested.
 
Upvote 0
Top