Created
June 24, 2019 14:05
-
-
Save SkyTreasure/9025f1b1fbfc6781c20c0ef4f0c5707c to your computer and use it in GitHub Desktop.
CustomPackage
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.yourpackagename; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.bridge.NativeModule; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.uimanager.ViewManager; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import javax.annotation.Nonnull; | |
public class CustomPackage implements ReactPackage { | |
@Nonnull | |
@Override | |
public List<NativeModule> createNativeModules(@Nonnull ReactApplicationContext reactContext) { | |
List<NativeModule> modules = new ArrayList<>(); | |
//If any other custom modules are there then you can declare it here | |
modules.add(new BackgroundScanModule(reactContext)); | |
return modules; | |
} | |
@Nonnull | |
@Override | |
public List<ViewManager> createViewManagers(@Nonnull ReactApplicationContext reactContext) { | |
return Collections.emptyList(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment