Android Question Library to control side LEDs

SJQ

Member
Licensed User
Longtime User
The company I work for have been looking at an alternative wall mounted android-based device with side LEDs. The device runs Android 8

I’ve previously used a different device from SIBO and I used their library (a jar file) with inline Java and that all worked, however this isn’t as simple.

The very basic details I was given by the supplier is that it uses the android Library libjnielc.so and an interface file jnielc.java

A bit of searching and I came across this sample eclipse app that's on GitHub yixucon/app at master · amitwalinjkar/yixucon · GitHub

How might I use this library in B4A?

Will a wrapper need to be created for this?

I don't know much about Eclipse and my Java is quite basic... any help would be appreciated.

Thanks...
 

MicroDrie

Well-Known Member
Licensed User
The company I work for have been looking at an alternative wall mounted android-based device with side LEDs. The device runs Android 8
If you do not want to publish the app, you must set B4A at least for Android 8: Level 27 in the manifest

I’ve previously used a different device from SIBO and I used their library (a jar file) with inline Java and that all worked, however this isn’t as simple.
Without those files mentioned it is simply impossible to even give an answer

The very basic details I was given by the supplier is that it uses the android Library libjnielc.so and an interface file jnielc.java
Are you talking about the aforementioned files or are they different files?

A bit of searching and I came across this sample eclipse app that's on GitHub yixucon/app at master · amitwalinjkar/yixucon · GitHub
You refer to an Eclipse source, but in reality they are probably a Visual Studio Community 2017 and Android XAMARIN source files.

How might I use this library in B4A?
You already wrote "however this isn't as simple", which raises the question, what exactly have you done yourself (in B4A or with something else)?

Will a wrapper need to be created for this?
How can anyone determine that without the aforementioned files?

I don't know much about Eclipse and my Java is quite basic... any help would be appreciated.
With a simple Java file you can suffice with a simple wrapper, but because we do not know what the existing library looks like, there is no answer to this questioin.

There are 5 apk files in the app release directory on GitHub. If you install those five apk's, can you control the site LEDs?
 
Upvote 0

emexes

Expert
Licensed User
The company I work for have been looking at an alternative wall mounted android-based device with side LEDs.

What are side LEDs? I thought maybe they were the lighting strip that some people have down the sides or underside of their car, but your phrase "wall mounted" indicates they are more to do with buildings than with cars. Can you post a link to your device's webpage or similar?

If you're talking about controlling RGB LED strips, then I'm pretty sure that's already been done using B4R, but not so sure if has been done using B4A.

1696891522538.png
 
Upvote 0

SJQ

Member
Licensed User
Longtime User
These devices are used in Advertising Displays, POS (Point of Sale) or Meeting Room Schedule displays etc.

They're usually android 8 to 11. and come in a range of sizes from 4" up to 84"

Some of them have built in LED lights either down the side or all the way round.

usually just RGBW single colour at a time.

I've used quite a few SIBO 7" and 10" the manufacturer supply's a .jar library and that was quite simple to load and use with inline java.

There was another make that used UART to set the colours and brightness.

The unit I started this topic about is a new one I've not seen before, it was only on loan for eval and the library supplied to me was a libjnielc.so

However it doesn't appear that a .so library files can be directly loaded into B4X and used, so, therefore a wrapper will be required.
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
These devices are used in Advertising Displays, POS (Point of Sale) or Meeting Room Schedule displays etc.

They're usually android 8 to 11. and come in a range of sizes from 4" up to 84"

Some of them have built in LED lights either down the side or all the way round.

usually just RGBW single colour at a time.

I've used quite a few SIBO 7" and 10" the manufacturer supply's a .jar library and that was quite simple to load and use with inline java.

There was another make that used UART to set the colours and brightness.

The unit I started this topic about is a new one I've not seen before, it was only on loan for eval and the library supplied to me was a libjnielc.so

However it doesn't appear that a .so library files can be directly loaded into B4X and used, so, therefore a wrapper will be required.
You can create a wrapper library if you have .so and .jar files.

Walter
 
Upvote 0

emexes

Expert
Licensed User
These devices are used in Advertising Displays, POS (Point of Sale) or Meeting Room Schedule displays etc.
Some of them have built in LED lights either down the side or all the way round.
usually just RGBW single colour at a time.
There was another make that used UART to set the colours and brightness.

Is it like these? :

s-l1600.jpg


s-l1600.jpg


s-l1600.jpg
 
Upvote 0

SJQ

Member
Licensed User
Longtime User
🤣🤣🤣🤣🤣

That's how my boss thinks software gets written...

However, this is one of the devices we use.

SIBO-10.png
 
Upvote 0

emexes

Expert
Licensed User
However, this is one of the devices we use.

Ok, so it's an Android tablet with lights added to one or more sides.

I'd expect that current versions would be moving to standard android.hardware.lights :

https://developer.android.com/reference/android/hardware/lights/Light

https://dev.to/tkuenneth/managing-lights-in-android-12-3ei9

TBH I'd be avoiding specialist hardware and just use the display background instead (either the whole background, or just a bar at top and/or bottom).

On the other hand, perhaps you're trying to avoid the compatibility headaches of customers wandering off and sourcing their own hardware, :rolleyes:

Do you have an actual working tablet to test with? Ideally with a sample app from the supplier that changes the LED colour/brightness. Even more ideally, with source and the actual libjnielc library and java header files used to create that sample app.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Will a wrapper need to be created for this?
yes
Alternatively you can use Javaobject.

I don´t know how to work with it. you need to find out by yourself.
But here is a wrapper for the .so-Files from the githubproject and make them accessible from b4a and b4j.

Both are UNTESTED
 

Attachments

  • jnielc.zip
    30.2 KB · Views: 50
Upvote 0

SJQ

Member
Licensed User
Longtime User
Thank You @DonManfred that was very kind of you.

I've used Inline Java and Java Object before so I'll give this a try.

At the moment I don't have any experience creating wrapper libraries. I know its something I really need to get my head around, I just never seem to have the time...

Thank you again. I'll send a donation for your time.
 
Upvote 0

SJQ

Member
Licensed User
Longtime User
@emexes The original loan unit from the supplier had to go back, but the company have decided to use these with or without the use of the LEDs.

So I have a delivery of 20 units coming Monday/Tuesday.

They will be used in care homes, placed in corridors and day rooms to receive alerts from a type of nurse call system.

Ideally the company do want the LEDs to operate, as the LED will be useful to indicate from a distance that an alert has been received as loud alarms sounds tend to disturb the other residents.

They do have PDAs and we have created an Android PDA app but turns out the PDAs they have are dated and run on EPOC32, the care staff need the original PDA for the care system and are refusing to carry 2 PDA, so we had to find another solution...
 
Upvote 0
Top