I am running B4A 9.01 (yeah, I know it's older, but I don't have time to spend fixing 'gotchas' in all my projects if I update to 12.x).
I want to create a widget for an android 5.x device, so I downloaded the example from this page:
But when I try to compile it, I get the error "Error description: CreateRemoteViews can only be called inside a Service module.".
And if I try to run this example:
I will get the error:
If this error is due to my version of B4A being older, how can I obtain a copy of the older widget example that will work with B4A 9.01?
I want to create a widget for an android 5.x device, so I downloaded the example from this page:
Android home screen widgets tutorial - part I
Edit: widgets are handled with receivers now. See the attached example. This tutorial will explain how to implement your own home screen widgets (also named App Widgets). It is important to understand that the widgets are created and managed in another process, different than the process that...
www.b4x.com
But when I try to compile it, I get the error "Error description: CreateRemoteViews can only be called inside a Service module.".
And if I try to run this example:
Widget Layout (Resizable, Adaptive)
Not sure if this can be considered a Tutorial, my first attempt. Lately I started to play with Widgets, mostly for curiosity. The main problem I encountered was how to design the Layout to make it resizable and make the content to adapt automatically to size changes. Unluckily designing a widget...
www.b4x.com
I will get the error:
B4X:
Error description: Object reference not set to an instance of an object.
Error occurred on line: 11
rv = ConfigureHomeWidget("4x1", "rv", 30, "Time in Letters", True)
Word: )
If this error is due to my version of B4A being older, how can I obtain a copy of the older widget example that will work with B4A 9.01?
Last edited: