This plugin uses the Jitsi SDK for android. See the plugin changelog for the list of corresponding SDKs used.
Follow installation steps 1-3 here.
-
Follow these steps to add Android to your project
-
Let capacitor sync the projects using either of the following commands
npx cap update
npx cap sync
- In your android/build.gradle, add the Maven repository
allprojects {
repositories {
maven {
url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
}
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
}
}
- In your android/app/build.gradle file, add Java 11 compatibility support
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
...
- Add uses permissions in the main app's AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mycompany.app">
+ <uses-permission android:name="android.permission.CAMERA" />
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
</manifest>
- Update android/variables.gradle file with this content
ext {
minSdkVersion = 23
compileSdkVersion = 32
targetSdkVersion = 32
androidxActivityVersion = '1.4.0'
androidxAppCompatVersion = '1.4.2'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxMaterialVersion = '1.6.1'
androidxExifInterfaceVersion = '1.3.3'
firebaseMessagingVersion = '23.0.5'
playServicesLocationVersion = '20.0.0'
androidxCoreVersion = '1.8.0'
androidxFragmentVersion = '1.4.1'
junitVersion = '4.13.2'
androidxJunitVersion = '1.1.3'
androidxEspressoCoreVersion = '3.4.0'
cordovaAndroidVersion = '10.1.1'
coreSplashScreenVersion = '1.0.0-rc01'
androidxWebkitVersion = '1.4.0'
}
In older capacitor versions, if not already created, follow the Ionic doc to create common variables. In android/build.gradle file, add apply from: "variables.gradle" as shown here.
-
Create notification icons in the Android App project
- In Android Studio, right click on the res folder in the android project -> New -> Image Asset
- create icon in the main res directory, with following config:
- Icon Type: Notification Icons
- Name: ic_notification
-
Build it in Android Studio
ionic capacitor open android
- If upgrading from previous versions of this plugin you may receive this error:
Error: Unfortunately you can't have non-Gradle Java modules and > Android-Gradle modules in one project
. Follow these steps to resolve it:
a. In Android Studio Go to File -> Invalidate Caches/Restart.
b. Close the project.
c. Go to project folder and delete .idea folder.
d. Delete YourProjectName.iml in project folder.
e. Delete app.iml in app folder.
f. run npx cap sync && npx cap open android
See Jitsi Meet Handbook.
This is an experimental feature and some users experienced issues on Android. The recommendation is to disable it in production build until a working solution is found.
featureFlags: { 'android.screensharing.enabled': false }
Report your working solutions here.
Consult the official Jitsi Android SDK documentation.