Creating an Extension and Include a Java Library

Hello,

So I am trying to create an extension (just for fun) but I have some questions and couldn’t find the answers over the internet.

  1. How do I include an external SDK library from GitHub like we do when we create an Android app using Android Studio. Just compile and go.
  2. How to give permissions like INTERNET and STORAGE WRITE?
  3. What happens if I have more than one class from one extension? Where should the java files (classes) go?
1 Like

This sounds be asked in an App Inventor Open Source Development forums.

  1. If it is a AAR library or you need a Gradle dependency, you can do that. You can only import JAR libraries using @UsesLibraries
  2. Use @UsesPermissions
  3. For multiple classes, Java files need to be in the same directory like the actual extension.
2 Likes

I had similar questions and I’m going to start a thread in the App Inventor Open Source Development forum, because I don’t think there is a summary yet

2 Likes

Could you please clarify! How do we add the Gradle dependency to AI source code?

Sounds great. Looking forward to reading your post.

2 Likes

2 posts were merged into an existing topic: To build an extension

Sorry I meant, you can’t do that, Google glide typing autocorrected from can’t to can.