-
-
Save GonzaloEspinoza/6762612f35ac8ce92674c9f4ce7d56ed to your computer and use it in GitHub Desktop.
Android Push Notification File para FCM
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.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