Skip to content

Instantly share code, notes, and snippets.

@Klerith
Created July 22, 2020 13:50
Show Gist options
  • Select an option

  • Save Klerith/7f4f03b1689bed4803431d67d0eaef38 to your computer and use it in GitHub Desktop.

Select an option

Save Klerith/7f4f03b1689bed4803431d67d0eaef38 to your computer and use it in GitHub Desktop.
Android Push Notification File para FCM
package com.tu-dominio.pushapp; <------ CAMBIAR!!!!
import io.flutter.app.FlutterApplication;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;
// Nota, esta linea la agregue
import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin;
public class Application extends FlutterApplication implements PluginRegistrantCallback {
@Override
public void onCreate() {
super.onCreate();
FlutterFirebaseMessagingService.setPluginRegistrant(this);
}
@Override
public void registerWith(PluginRegistry registry) {
// GeneratedPluginRegistrant.registerWith(registry);
FirebaseMessagingPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment