2018-08-07 23:02:40 -07:00
|
|
|
|
2018-08-15 20:30:06 -07:00
|
|
|
package com.reactnativecommunity.webview;
|
2018-08-07 23:02:40 -07:00
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import com.facebook.react.ReactPackage;
|
|
|
|
|
import com.facebook.react.bridge.NativeModule;
|
|
|
|
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
|
|
|
import com.facebook.react.uimanager.ViewManager;
|
|
|
|
|
import com.facebook.react.bridge.JavaScriptModule;
|
2018-08-15 20:30:06 -07:00
|
|
|
public class RNCWebViewPackage implements ReactPackage {
|
2018-08-07 23:02:40 -07:00
|
|
|
@Override
|
|
|
|
|
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
2018-08-15 20:30:06 -07:00
|
|
|
return Arrays.<NativeModule>asList(new RNCWebViewModule(reactContext));
|
2018-08-07 23:02:40 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Deprecated from RN 0.47
|
|
|
|
|
public List<Class<? extends JavaScriptModule>> createJSModules() {
|
|
|
|
|
return Collections.emptyList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
2018-08-15 20:30:06 -07:00
|
|
|
RNCWebViewManager viewManager = new RNCWebViewManager();
|
2018-08-07 23:02:40 -07:00
|
|
|
return Arrays.<ViewManager>asList(viewManager);
|
|
|
|
|
}
|
|
|
|
|
}
|