Created
August 17, 2017 08:10
-
-
Save alien3d/0df0363cb0a1c5c7ae20bc9fb8fa67c9 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.example; | |
import android.support.annotation.Nullable; | |
import com.facebook.react.ReactPackage; | |
import com.reactnativenavigation.NavigationApplication; | |
import com.oblador.vectoricons.VectorIconsPackage; | |
import com.facebook.CallbackManager; | |
import com.facebook.FacebookSdk; | |
import com.facebook.reactnative.androidsdk.FBSDKPackage; | |
import java.util.List; | |
import java.util.Arrays; | |
import com.facebook.soloader.SoLoader; | |
public class MainApplication extends NavigationApplication { | |
private static CallbackManager mCallbackManager = CallbackManager.Factory.create(); | |
protected static CallbackManager getCallbackManager() { | |
return mCallbackManager; | |
} | |
@Override | |
public boolean isDebug() { | |
return BuildConfig.DEBUG; | |
} | |
protected List<ReactPackage> getPackages() { | |
return Arrays.<ReactPackage>asList( | |
new VectorIconsPackage(), | |
new FBSDKPackage(mCallbackManager) | |
); | |
} | |
@Nullable | |
@Override | |
public List<ReactPackage> createAdditionalReactPackages() { | |
return getPackages(); | |
} | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
SoLoader.init(this, false); | |
FacebookSdk.sdkInitialize(getApplicationContext()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment