attachment argument accepts a list of attachments and every attachment's absolute path should be provided. So developer doesn't have to worry about relative path changes such as earlier / referred to external storage but now it works as path of ASD.
At least one extension among them uses the same library as this one i.e. commons-net.
Hi Sunny. Indeed I know that, and App Inventor produces convincing absolute paths. However, it can't find those paths and that is likely to be the issue with attachments. I'm thinking that the next App Inventor update should at least have file handling and paths fixed, even if the way things are presented is still going to be confusing to the majority of Users.
I just checked the source and found that the extension doesn't declare read permission.
So you will have to additionally drag File component and tick ReadPermission property.
It is working fine if I grant read permission.
Only one extension can use the library, so other extension's developers will have to remove jar from their extensions.
There is a second method too if extension developer is not active in the community.
In addition to your own Java code, you can also include external libraries, by following the steps in How to Add a Component. The library jar files will be included in the aix file when you package your extension
One complication here is that the external libraries (jar files) must be unique across projects. If a project imports several extensions, then two different extensions cannot import the same jar file.
Something needs to be done about this. There are more extension developers and more extensions every week. How unique must a jar be? In name only or also in stored contents?
Can the App Inventor side prevent this issue? A registration of jars used by extensions perhaps?
Both the events are triggered if any error occurs so what's happening with your app is likely to happen.
But, before asking a question in App Inventor Community make sure you post the blocks of AI2.
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
i used/modified your aia file for listing installed apps, and it worked great, thanks. If you could just export an aia file and email it or post it, I'm sure I could get the example working and modify it very quickly. I could then write a quick post explaining my errors. Thanks
does anyone have working aia code to share on this? preferably a bare bones example? there have been a number people who have had problems with the posted examples, but later have gotten it to work. ....e.g.
with a simple example, i could get mine working and share my bugs. a back and forth with questions and answers and posting code is time consuming with a many wrong paths, as conversations show.
if anyone has working aia code to share, I'd appreciate it, as there is on most every extension. It would lead to a quick solution about which I could then make one posting. Thanks
Hi @jhn
If there had been designer properties or complex logics for setup/initialization of extension, then I would have surely posted the aia file.
You can find the demo blocks in first post.