Created
July 5, 2018 17:48
-
-
Save gHashTag/221cf8bbae5e9a7dca6d74b40bc5821f to your computer and use it in GitHub Desktop.
This file contains hidden or 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.iyogi; | |
| import android.app.Application; | |
| import com.facebook.FacebookSdk; | |
| import com.facebook.CallbackManager; | |
| import com.facebook.appevents.AppEventsLogger; | |
| import com.facebook.react.ReactApplication; | |
| import com.facebook.reactnative.androidsdk.FBSDKPackage; | |
| import com.facebook.react.ReactNativeHost; | |
| import com.facebook.react.ReactPackage; | |
| import com.facebook.react.shell.MainReactPackage; | |
| import com.facebook.soloader.SoLoader; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| public class MainApplication extends Application implements ReactApplication { | |
| private static CallbackManager mCallbackManager = CallbackManager.Factory.create(); | |
| protected static CallbackManager getCallbackManager() { | |
| return mCallbackManager; | |
| } | |
| private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { | |
| @Override | |
| public boolean getUseDeveloperSupport() { | |
| return BuildConfig.DEBUG; | |
| } | |
| @Override | |
| protected List<ReactPackage> getPackages() { | |
| return Arrays.<ReactPackage>asList( | |
| new MainReactPackage(), | |
| new FBSDKPackage(mCallbackManager) | |
| ); | |
| } | |
| @Override | |
| protected String getJSMainModuleName() { | |
| return "index"; | |
| } | |
| }; | |
| @Override | |
| public ReactNativeHost getReactNativeHost() { | |
| return mReactNativeHost; | |
| } | |
| @Override | |
| public void onCreate() { | |
| super.onCreate(); | |
| SoLoader.init(this, /* native exopackage */ false); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment