Convert Java LCD library to B4A library

Philip Prins

Active Member
Licensed User
Longtime User
I am looking for someone to convert an existing library or inline code to use this library:

Full documentation here:
https://www.dropbox.com/sh/jpwg1gtyxigugng/AACZL-jQA3noh9z3-5NEkWLwa?dl=0

Code: Copy
Start
Obtain service SublcdManager sublcdManager=(SublcdManager)getSystemService("sublcd");
Register
registerEvent(Context context);

After successfully registered, the application can response to the broadcast event of the knob (channel switch) and buttons, also enable to draw contents (text/image) to the screen. Note: Make sure the carried parameter string in the broadcast of the knob which you are about to use equals to the package name of the current application.
Unregister when about to exit unregisterEvent(Context context);

After unregistered, the application has no permission to draw contents to the screen.
End
 
What is your budget for this lib?
 
I don´t know if it is a good idea to add a broadcastreceiver to a lib. I did added one; should work i guess. But maybe it is better to create a broadcastreceiver directly in b4a and work with the data incoming at this BCR.

As i do not have such a device it is a bit difficult to write a lib for it if you are not able to test directly.

You need to find out :D

Please find 1st version to test attached :)
 

Attachments

I don´t know if it is a good idea to add a broadcastreceiver to a lib. I did added one; should work i guess. But maybe it is better to create a broadcastreceiver directly in b4a and work with the data incoming at this BCR.

As i do not have such a device it is a bit difficult to write a lib for it if you are not able to test directly.

You need to find out :D

Please find 1st version to test attached :)

I get an error;
Code: Copy
* Activity (main) Resume **
java.lang.Exception: Sub lcd_onreceive was not found.
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197)
    at anywheresoftware.b4a.BA$2.run(BA.java:365)
    at android.os.Handler.handleCallback(Handler.java:815)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:194)
    at android.app.ActivityThread.main(ActivityThread.java:5643)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
**
 
oups. Rename the sub in the sample
Code: Copy
Sub LCD_onReceived(info As String)
    Log($"LCD_onReceived(${info})"$)
End Sub

to
Code: Copy
Sub LCD_onReceive(info As String)
    Log($"LCD_onReceive(${info})"$)
End Sub

I´ll change the wrong suggestion in the lib for the next release.
 
oups. Rename the sub in the sample
Code: Copy
Sub LCD_onReceived(info As String)
    Log($"LCD_onReceived(${info})"$)
End Sub

to
Code: Copy
Sub LCD_onReceive(info As String)
    Log($"LCD_onReceive(${info})"$)
End Sub

I´ll change the wrong suggestion in the lib for the next release.
Works , great Job
 
Back
Top