2017-03-02 11:30:08 +00:00
|
|
|
package io.invertase.firebase;
|
|
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
|
|
import com.facebook.react.ReactPackage;
|
|
|
|
|
import com.facebook.react.bridge.NativeModule;
|
|
|
|
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
|
|
|
import com.facebook.react.uimanager.UIManagerModule;
|
|
|
|
|
import com.facebook.react.uimanager.ViewManager;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collections;
|
2018-08-04 21:57:06 +01:00
|
|
|
import java.util.List;
|
2017-03-02 11:30:08 +00:00
|
|
|
|
|
|
|
|
@SuppressWarnings("unused")
|
|
|
|
|
public class RNFirebasePackage implements ReactPackage {
|
2017-03-02 11:38:43 +00:00
|
|
|
private Context mContext;
|
2017-03-02 11:30:08 +00:00
|
|
|
|
2017-03-02 11:38:43 +00:00
|
|
|
public RNFirebasePackage() {
|
|
|
|
|
}
|
2017-03-02 11:30:08 +00:00
|
|
|
|
2017-03-02 11:38:43 +00:00
|
|
|
/**
|
|
|
|
|
* @param reactContext react application context that can be used to create modules
|
|
|
|
|
* @return list of native modules to register with the newly created catalyst instance
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
|
|
|
|
List<NativeModule> modules = new ArrayList<>();
|
|
|
|
|
modules.add(new RNFirebaseModule(reactContext));
|
|
|
|
|
return modules;
|
|
|
|
|
}
|
2017-03-02 11:30:08 +00:00
|
|
|
|
2017-03-02 11:38:43 +00:00
|
|
|
/**
|
|
|
|
|
* @param reactContext
|
|
|
|
|
* @return a list of view managers that should be registered with {@link UIManagerModule}
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
2017-05-31 16:33:08 +01:00
|
|
|
return Collections.emptyList();
|
2017-03-02 11:38:43 +00:00
|
|
|
}
|
2017-03-02 11:30:08 +00:00
|
|
|
}
|