Skip to content

Instantly share code, notes, and snippets.

@helenaford
Created August 18, 2019 21:09
Show Gist options
  • Save helenaford/38754ed872547f869977e3e558d23888 to your computer and use it in GitHub Desktop.
Save helenaford/38754ed872547f869977e3e558d23888 to your computer and use it in GitHub Desktop.
React Native + Firebase: MainApplication.java
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
public class MainApplication extends Application implements ReactApplication {
...
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here
packages.add(new RNFirebaseMessagingPackage());
packages.add(new RNFirebaseNotificationsPackage());
return packages;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment