Is it possible to create an AppInventor extension from this library?
Hi everyone! As the title of my question says, is it possible to create an AIX extension for AppInventor using this library?
From what I saw in other Issues this library has been used before on Android, so I assume there is a possibility
I leave a little reference:
http://kio4.com/appinventor/125B_extensiones_crear_i.htm
Yes, it should be possible.
https://community.appinventor.mit.edu/t/error-from-companion-java-lang-noclassdeffounderror/451?u=alexander
I share another link
There is a user who tried to perform the extension: He did it but he gets Runtime errors
Since there are no dependencies manager then all jar files must be added to the project somehow. Another option, which was suggested in that thread is to create a "fat jar" with everything included.
In that case, what would be the other missing dependencies / libraries? 🤔
This is a maven-project. You can find all direct dependencies in the POM-file.
Ok i will try and post the results here
Ok, I modified "pom.xml" to download each dependency separately, since the "fat jar" did not work correctly for me
I no longer have compilation or runtime errors, but I am stuck on "the main thing"
I have not been able to find a method similar to "GetDevices" in the java files here in the repository, should scanning be stopped manually?
What I want to do is something similar to this (but in code):


Looking for chromecast devices works through discovery. You can find code example in the project Readme file.
In that case I suppose that I will use a Clock to verify every X seconds the detected Cast devices
From what I see "Chromecasts.get()" returns a list of devices in List, so I must convert to YailList to be able to use it in Appinventor
I don't know if issue #125 will be related, but the method which in my case should return a list of Devices returns an empty list
Should any additional steps be taken?
This is the used code:
`@SimpleFunction(description = "Show list of devices detected") public List<String> ListaDispositivos() { List<String> listachromecasts = new ArrayList<String>();
for (Object dispositivos : ChromeCasts.get()) {
ServiceEvent serviceEvent = (ServiceEvent) dispositivos;
String deviceName = serviceEvent.getInfo().getName();
listachromecasts.add(deviceName);
}
return listachromecasts;
}`
This means that no devices have been discovered on your network (yet?). You can try turning on the DEBUG level.
Also I don't see where you have started the discovery. It needs to be started before looking for the devices.
This means that no devices have been discovered on your network (yet?). You can try turning on the DEBUG level.
How do I do this?
Also I don't see where you have started the discovery. It needs to be started before looking for the devices.
Device discovery I set it in another block, basically like this (I use a Clock to stop Discovery):

The project uses slf4j. You need to figure out how to configure logging in your project.
Could Logcat be a good option?
I don't know. This is not the right place to ask such questions.