Created
December 29, 2018 06:52
-
-
Save radinreth/a48232ecfd9495bb3dc95a6b8df2297a 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
package com.rnsociallogin; | |
import android.app.Application; | |
import com.facebook.CallbackManager; | |
import com.facebook.FacebookSdk; | |
import com.facebook.reactnative.androidsdk.FBSDKPackage; | |
import com.facebook.appevents.AppEventsLogger; | |
import com.facebook.react.ReactApplication; | |
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(); | |
AppEventsLogger.activateApp(this); | |
SoLoader.init(this, /* native exopackage */ false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment