I have try to build simple extension , but never try to add libraries , can any 1 tell me how to add libraries.
Here are some libraries
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.content.Intent;
import android.content.pm.PackageManager;
import com.google.appinventor.components.annotations.DesignerComponent;
import com.google.appinventor.components.annotations.SimpleObject;
import com.google.appinventor.components.common.ComponentCategory;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.Component;
import com.google.appinventor.components.runtime.ComponentContainer;
import com.google.appinventor.components.annotations.androidmanifest.*;
import com.google.appinventor.components.annotations.UsesActivities;
But use only those which you want there are some which you have to use
I think he is not asking for imports he is asking of external libraries.
In the bottom right corner of the ide where u are making extension lies, a button named Libraries
Click that and import the libraries (jar) into your extension
Ok I got it but he said like this so i thought that 0
Actually i am trying to create in app update extension, i try also.
inAppUpdateManager = InAppUpdateManager.Builder(this, REQ_CODE_VERSION_UPDATE)
.resumeUpdates(true) // Resume the update, if the update was stalled. Default is true
.mode(Constants.UpdateMode.IMMEDIATE)
.snackBarAction("An update has just been downloaded")
.snackBarAction("RESTART")
.handler(this);
inAppUpdateManager.checkForAppUpdate();
@override
public void onInAppUpdatesStats(InAppupdateStatus status) {
if (status.isDownloaded()){
View view = getwindow().getDecorview().findViewById(android.R.id.content);
Snackbar snackbar = Snackbar.make(view,
text:"An update has just been downloaded.;
Snackbar.setAction(resid:"", new_View.OnClickListener() {
@override
public void onClick(View v) {
inAppUpdateManager.completeUpdate();
}
});
}snackbar.show();
}
}
I try this , i show this code in youtube.
For libary i import aar file , i rename it as jar.
not working , when i build it save as nix.
The .nix
file is the project file of the particular extension you are building, and .aix
file is the actual extension.
-
To download the project file i.e
.nix
clickExport Project
-
To build the extension and get the actual extenion file i.e
.aix
clickCompile Extension
-
To upload an external library click “Libraries”
I hope its clear now
Ok.
- i upload my json.jar [Done]
- Register in @UsesLibraries(libraries = “json.jar”) [Done]
- Import …??? [How]
Screenshoot
I need to know how, when and where use it
@Jonathan_Urbina once you click on import libraries then scroll towards bottom you will se a section to import the libraries
Unfortunately, the Extension IDE does not seem to compile with the new SDK yet. Implementing SDK-34-specific things therefore produces error messages.
Is there a plan for when this will be adapted?
I will ask Abhijth and reply in the topic.
The IDE is outdated and a new major update is scheduled, delayed due to builder updates. Once the bugs are sorted out and it’s stable we would release the IDE Update