feat(android) adds initializer for SoLoader.init
This commit is contained in:
parent
ddcb85a1d8
commit
3b33ba3f5d
|
@ -48,6 +48,7 @@ dependencies {
|
||||||
implementation 'com.jakewharton.timber:timber:4.7.1'
|
implementation 'com.jakewharton.timber:timber:4.7.1'
|
||||||
implementation 'com.squareup.duktape:duktape-android:1.3.0'
|
implementation 'com.squareup.duktape:duktape-android:1.3.0'
|
||||||
implementation 'com.google.code.gson:gson:2.8.6'
|
implementation 'com.google.code.gson:gson:2.8.6'
|
||||||
|
implementation "androidx.startup:startup-runtime:1.1.0"
|
||||||
|
|
||||||
if (rootProject.ext.libreBuild) {
|
if (rootProject.ext.libreBuild) {
|
||||||
implementation(project(':react-native-device-info')) {
|
implementation(project(':react-native-device-info')) {
|
||||||
|
|
|
@ -57,6 +57,14 @@
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
tools:replace="android:authorities">
|
tools:replace="android:authorities">
|
||||||
</provider>
|
</provider>
|
||||||
|
<provider
|
||||||
|
android:name="androidx.startup.InitializationProvider"
|
||||||
|
android:authorities="${applicationId}.androidx-startup"
|
||||||
|
android:exported="false">
|
||||||
|
<meta-data android:name="org.jitsi.meet.sdk.JitsiInitializer"
|
||||||
|
android:value="androidx.startup" />
|
||||||
|
</provider>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Copyright @ 2021-present 8x8, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.jitsi.meet.sdk;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.startup.Initializer;
|
||||||
|
|
||||||
|
import com.facebook.soloader.SoLoader;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class JitsiInitializer implements Initializer<Boolean> {
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Boolean create(@NonNull Context context) {
|
||||||
|
SoLoader.init(context, /* native exopackage */ false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public List<Class<? extends Initializer<?>>> dependencies() {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,7 +30,6 @@ import com.facebook.react.devsupport.DevInternalSettings;
|
||||||
import com.facebook.react.jscexecutor.JSCExecutorFactory;
|
import com.facebook.react.jscexecutor.JSCExecutorFactory;
|
||||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||||
import com.facebook.react.uimanager.ViewManager;
|
import com.facebook.react.uimanager.ViewManager;
|
||||||
import com.facebook.soloader.SoLoader;
|
|
||||||
import com.oney.WebRTCModule.RTCVideoViewManager;
|
import com.oney.WebRTCModule.RTCVideoViewManager;
|
||||||
import com.oney.WebRTCModule.WebRTCModule;
|
import com.oney.WebRTCModule.WebRTCModule;
|
||||||
|
|
||||||
|
@ -174,8 +173,6 @@ class ReactInstanceManagerHolder {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SoLoader.init(activity.getApplication(), /* native exopackage */ false);
|
|
||||||
|
|
||||||
List<ReactPackage> packages
|
List<ReactPackage> packages
|
||||||
= new ArrayList<>(Arrays.asList(
|
= new ArrayList<>(Arrays.asList(
|
||||||
new com.calendarevents.CalendarEventsPackage(),
|
new com.calendarevents.CalendarEventsPackage(),
|
||||||
|
|
Loading…
Reference in New Issue