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
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.
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.
* 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)
**