Last active
February 29, 2020 11:11
-
-
Save rafaelpadovani/6144f7d0bdd74da41675125ee1f0f2b2 to your computer and use it in GitHub Desktop.
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
//DeviceInfoPackage.java | |
package com.deviceinfoexample; | |
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.smsautomatic.DeviceInfoModule; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
public class DeviceInfoPackage implements ReactPackage { | |
@Override | |
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { | |
return Collections.emptyList(); | |
} | |
@Override | |
public List<NativeModule> createNativeModules( | |
ReactApplicationContext reactContext) { | |
List<NativeModule> modules = new ArrayList<>(); | |
//this is where you register the module | |
modules.add(new DeviceInfoModule(reactContext)); | |
return modules; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment