Created
May 11, 2020 08:31
-
-
Save dilipsuthar97/fb12caf97e77b512cbd580e2882b7aa8 to your computer and use it in GitHub Desktop.
Android Native Module wrapper for ReactNative -MyLibraryPackage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.reactlibrary; | |
import androidx.annotation.NonNull; | |
import java.util.ArrayList; | |
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; | |
public class MyLibraryPackage implements ReactPackage { | |
@NonNull | |
@Override | |
public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) { | |
List<NativeModule> modules = new ArrayList<>(); | |
modules.add(new MyLibraryModule(reactContext)); | |
return modules; | |
} | |
@NonNull | |
@Override | |
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { | |
return Collections.emptyList(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment