Android Question [SOLVED] WidgetService, 2nd module, layout View

Similar threads

B4A Tutorial [B4X] B4XTable with custom cells layout
B4A Tutorial Automatic Foreground Mode
B4J Code Snippet [B4X] Trust all SSL Socket
Share My Creation User Login + MySQL PHP API
B4A Code Snippet Theme Colors


Licensed User

I have a WidgetService and during initialization it loads a layout file.
In this layout file, it is an ImageView named 'iLed', with filemane="green_led.png".
(in this layout, 2 files : green_led.png, red_led.png)
No problem, it works.

When the widget is clicked, a second activity is launched (file name : second).
In this second activity, the ImageView from the widgetservice is modified by the following code :
dim bm as BitMap

At runtime, an error is thrown :
java.lang.RuntimeException: java.lang.NoSuchFieldException: second_iled

It looks like (for me ...) that 'iled' is associated with 'second' file, despite the prefix 'WidgetService' used.

where is my mistake ?

Thank's in advance.

PS :
the Views in the layout file are not Dim declared in the WidgetService module ...
Should it be done ?
(as far as I recall, they're not in the tutos available on the site ...)
Last edited:


Licensed User

I had allready seen this function, but because of it's name i imagined something about delay ... and decided not to investigate further

I keep learning