2018-08-15 20:30:06 -07:00
|
|
|
package com.reactnativecommunity.webview;
|
2018-08-07 23:02:40 -07:00
|
|
|
|
2019-03-19 15:42:47 +01:00
|
|
|
import com.facebook.react.ReactPackage;
|
|
|
|
|
import com.facebook.react.bridge.JavaScriptModule;
|
|
|
|
|
import com.facebook.react.bridge.NativeModule;
|
|
|
|
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
|
|
|
import com.facebook.react.uimanager.ViewManager;
|
|
|
|
|
|
2018-08-07 23:02:40 -07:00
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
2018-09-19 01:19:06 +02:00
|
|
|
public class RNCWebViewPackage implements ReactPackage {
|
2019-03-19 15:42:47 +01:00
|
|
|
@Override
|
|
|
|
|
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
2019-03-20 14:04:47 +01:00
|
|
|
return Collections.singletonList(new RNCWebViewModule(reactContext));
|
2019-03-19 15:42:47 +01:00
|
|
|
}
|
2018-08-07 23:02:40 -07:00
|
|
|
|
2019-03-19 15:42:47 +01:00
|
|
|
// Deprecated from RN 0.47
|
|
|
|
|
public List<Class<? extends JavaScriptModule>> createJSModules() {
|
|
|
|
|
return Collections.emptyList();
|
|
|
|
|
}
|
2018-08-07 23:02:40 -07:00
|
|
|
|
2019-03-19 15:42:47 +01:00
|
|
|
@Override
|
|
|
|
|
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
2019-03-20 14:04:47 +01:00
|
|
|
return Collections.singletonList(new RNCWebViewManager());
|
2019-03-19 15:42:47 +01:00
|
|
|
}
|
2018-11-21 12:46:43 +02:00
|
|
|
}
|