Varun Kumar
1 min readApr 25, 2019

--

After adding SplashActivity.java with above content, push notification onclick listener stopped working.

Correct content in SplashActivity should be-

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

Intent intent = new Intent(this, MainActivity.class);

// NOTE: This is necessary to forward the original intent on to the main activity.
// This makes firebase.notifications().getInitialNotification() work.
intent.putExtras(this.getIntent());

startActivity(intent);
finish();
}

Reference: https://github.com/invertase/react-native-firebase/issues/1027#issuecomment-390557446

--

--

Varun Kumar
Varun Kumar

Written by Varun Kumar

Full Stack Developer | I turn ideas into Products

No responses yet