You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): Failed to handle method call
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Intent android.app.Activity.getIntent()' on a null object reference
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.setActivity(FlutterLocalNotificationsPlugin.java:780)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.registerWith(FlutterLocalNotificationsPlugin.java:116)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:43)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at mobihub.mobihub.Application.registerWith(Application.java:19)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService.startBackgroundIsolate(FlutterFirebaseMessagingService.java:164)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.onMethodCall(FirebaseMessagingPlugin.java:176)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at android.os.Looper.loop(Looper.java:165)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at android.app.ActivityThread.main(ActivityThread.java:6861)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/MethodChannel#plugins.flutter.io/firebase_messaging(13851): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
E/flutter (13851): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'android.content.Intent android.app.Activity.getIntent()' on a null object reference, null)
This is my Application.java Class
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);
}
}
This is manifest class
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="mobihub.mobihub">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application android:name=".Application"
android:label="mobihub"
android:icon="@mipmap/ic_launcher">
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/notification_channel_id"/>
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
tools:ignore="Instantiatable">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name="com.google.firebase.components.ComponentDiscoveryService"
tools:ignore="MissingClass">
<meta-data
android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
</service>
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
</application>
</manifest>
The text was updated successfully, but these errors were encountered:
maindoliya
changed the title
when application launch incase when use (onBackground:)....How to resolve it
[firebase_messaging]when application launch incase when use (onBackground:)....
Jul 15, 2020
Hi @maindoliya
Can you please provide your flutter doctor -v, and a complete reproducible minimal code sample from main.dart without flutter_local_notifications
Thank you
This is my Application.java Class
This is manifest class
build.gradle
MainClass
The text was updated successfully, but these errors were encountered: