Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with wix/react-native-navigation v2 #212

Open
dungnguyen10989 opened this issue Dec 21, 2018 · 1 comment
Open

How to use with wix/react-native-navigation v2 #212

dungnguyen10989 opened this issue Dec 21, 2018 · 1 comment

Comments

@dungnguyen10989
Copy link

RNN v2 using other structure, and it's MainActivity it not contain onCreate method to init Fabric.
`public class MainActivity extends NavigationActivity {

@Override
protected String getJSBundleFile() {
    return CodePush.getJSBundleFile();
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    MainApplication.getCallbackManager().onActivityResult(requestCode, resultCode, data);
}

}`
How can I resolve this issue ?

@bacrilio
Copy link

Try this

// ......
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.crashlytics.android.Crashlytics;
import io.fabric.sdk.android.Fabric;
// ......

public class MainActivity extends NavigationActivity
{
   // ......
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
   // ......
        Fabric.with(this, new Crashlytics());
   // ......
    }
   // ......
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants