Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First notification comes from the wrong side (doesn't go to setNotificationWillShowInForegroundHandler) #509

Closed
massimilianochiodi opened this issue Nov 16, 2021 · 36 comments · Fixed by #534

Comments

@massimilianochiodi
Copy link

Description:

In Android, first notification get (application in FOREGROUND) is as if the app is in 'Background' or 'Closed', the first notification comes via 'OneSignal.shared.setNotificationOpenedHandler(OSNotificationOpenedResult result) {' ...
The next ones arrive in the right place: 'OneSignal.shared.setNotificationWillShowInForegroundHandler (OSNotificationReceivedEvent event) {'

Luckily, when app is in background or app is closed, notification arrives at right place...

Environment

Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale it-IT)
Android toolchain - develop for Android devices (Android SDK version 31.0.0)
Android Studio (version 2020.3)
OneSignal Flutter ^3.2.6

Steps to Reproduce Issue:

  1. Onesignal configuration ( INIT ) is in main.dart (
OneSignal.shared.setLogLevel(OSLogLevel.verbose, OSLogLevel.none);
OneSignal.shared.setAppId(Config.getOnesignalAppId);
OSDeviceState? status = await OneSignal.shared.getDeviceState();
AppVariableSingleton.shared.tokenOnesignal = status!.userId!;
  1. with 'await Future.doWhile(() async' .. .ask onesignal player id and start 'APP' because use inappwebview and have to send onesignal token (playerid) in web header on the first call,
  2. APP call home_page.dart with onesignal notification callback

Anything else:

(crash stacktraces, as well as any other information here)
No crash, only firt notification comes from the wrong side

@massimilianochiodi
Copy link
Author

UPDATE :::
setNotificationOpenedHandler not fire only for first foreground notification received when app is opened for first time.

@hugoyair
Copy link

I have the same problem like you, I posted before but I couldn´t explain it well, thank you, I hope some one can help us.

@jkasten2
Copy link
Member

@massimilianochiodi @hugoyair Thanks for reporting! Could you provide the following details.

  1. Provide a logcat from the start of the issue up to the issue.
  2. What Android versions and device models the happens on. (Also ones that you find the issue does not happen on is helpful too)
  3. Does issue happen on iOS?
  4. Can you provide a step-by-step of reproducing the issue so we can reproduce the issue in the same way
  5. Does the issue happen on an older version of the OneSignal SDK?

@hugoyair
Copy link

hugoyair commented Nov 16, 2021

1- image
image

log says that my app is in backgroud, show notification, but I´m focus into of the app.

2- Huawei p40 lite, android 10
Huawei p30 lite, android 10
Xiaomi redmi note 8, android 9

3- I don´t know exactly, I don´t have a iphone or ipad to tested it.
4-Yes, It´s the same that @massimilianochiodi said before, when we init one signal and after we post a notification to come to another celphone, should enter to the handler OneSignal.shared.setNotificationWillShowInForegroundHandler , because my app is focus, but It´s wrong, it enter to the another handler called OneSignal.shared.setNotificationOpenedHandler .

But only first time.

  1. I tested it since one signal version 3.2.0 until the last version.

@massimilianochiodi
Copy link
Author

Mine is a particular situation.
The application use Flavors ( Flutter / Android / IOS ).
For this reasons have to use a Gradle version lower than 7. Because otherwise I get error with android plugin when producing apk / aab packages. I am therefore forced to use an older version of some libraries including onesignal.

Problem only occurs with the first foreground notification.
The first receipt as soon as you have installed the app.
It may not be a serious problem.

However, I can also send a log.
And a few pieces of code ...

  1. setting onesignal (main.dart)
OneSignal.shared.setLogLevel(OSLogLevel.verbose, OSLogLevel.none);
  OneSignal.shared.setAppId(Config.getOnesignalAppId);
  avviaapp();
  1. ask for OneSignal playerid
Future<void> avviaapp() async {
  print(">>> avvio applicazione");

  var toContinue = true;

  int sec = 0;
  await Future.doWhile(() async {
    await Future.delayed(Duration(seconds: 1));
    sec += 1;
    if (sec >= 10) {
      runApp(App(""));
      return false;
    }

    OSDeviceState status = await OneSignal.shared.getDeviceState();
    if(status.userId != null) {
      AppVariableSingleton.shared.tokenOnesignal = status.userId;
      runApp(App(status.userId));
      return true;
    } else {
      print("> passati $sec secondi, token onesignal non ancora ricevuto");
      return toContinue;
    }

  }).timeout(Duration(seconds: 10), onTimeout: () {
    toContinue = false;
    print('> Timed Out');
    runApp(App(""));
  });
}

(Normally ask 5-6 seconds for receive OneSignal Player Id, This is important because I have to put the player id in the header of webapp)

  1. call app passing OneSignal playerid
class App extends StatelessWidget {
  const App(this.onesignaltoken);

  final String onesignaltoken;

  @override
  Widget build(BuildContext context) {

    return MaterialApp(

      debugShowCheckedModeBanner: false,
      title: 'FairField',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomePage(onesignaltoken: onesignaltoken),
      //home: TestUrl(onesignaltoken: onesignaltoken,),
    );
  }

}
  1. call homepage for webview

In initstate have function 'configuraonesignal();'

OneSignal.shared.promptUserForPushNotificationPermission().then((accepted) {
      print("Permessi accettati: $accepted");
    });


    OneSignal.shared.setNotificationWillShowInForegroundHandler(
            (OSNotificationReceivedEvent event) {

          mostroMessaggio(event);
          event.complete(null);

        });


    OneSignal.shared
        .setNotificationOpenedHandler((OSNotificationOpenedResult result) {
      OSNotification lanotifica = result.notification;
      Map<String,dynamic> payload = lanotifica.additionalData ?? Map();
      print("Hai aperto la notifica: \n${result.notification
          .jsonRepresentation().replaceAll("\\n", "\n")}");

      if(payload.isNotEmpty) {
        String pagina = "";
        if(payload.containsKey("pagina")) {
          pagina = payload["pagina"] as String;
          if(pagina.isNotEmpty) {
            replaceurl = pagina;
            if (webViewController != null) {
              webViewController
                  .loadUrl(urlRequest: URLRequest(url: Uri.parse(pagina)));
            }
          }
        }
      }

    });

    OneSignal.shared.setPermissionObserver((OSPermissionStateChanges changes) {
      // Will be called whenever the permission changes
      // (ie. user taps Allow on the permission prompt in iOS)
    });

With 'setNotificationWillShowInForegroundHandler' receive foreground notification ad show alert with title, body and take payload for make an action ( url redirect in webview )

With 'setNotificationOpenedHandler' ( notification when app closed or app in background ) only take 'payload' for make redirect.

  1. My Log

An Observatory debugger and profiler on SM A325F is available at: http://127.0.0.1:53246/jb-UiywBzHc=/
V/FA (12382): Recording user engagement, ms: 1812
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669237222816]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669237222816]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376666781309536]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376666781309536]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376666781309920]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376666781309920]
D/InputTransport(12382): Input channel destroyed: 'ClientS', fd=175
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669237222720]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669237222720]
V/FA (12382): Activity paused, time: 362348664
Unhandled exception:
Null check operator used on a null value
#0 resolveBuildDir (package:devtools_server/src/external_handlers.dart:115:59)

#1 defaultHandler (package:devtools_server/src/external_handlers.dart:33:42)

#2 serveDevTools (package:devtools_server/src/server.dart:201:15)

#3 serveDevToolsWithArgs (package:devtools_server/src/server.dart:72:10)

I/etplace.app_de(12382): Thread[6,tid=21694,WaitingInMainSignalCatcherLoop,Thread*=0xb400006fc844f000,peer=0x13c83580,"Signal Catcher"]: reacting to signal 28
I/etplace.app_de(12382):
I/etplace.app_de(12382): SIGSAVEPRF profile save
D/FA (12382): Application going to the background
I/ViewRootImpl@1a24b74MainActivity: stopped(false) old=false
V/FA (12382): Activity resumed, time: 362352286
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669281918848]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669281918848]
I/SurfaceControl(12382): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x6833199 / android.view.SurfaceControl.readFromParcel:1117 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664232150080]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664232150080]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664232149024]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664232149024]
I/ViewRootImpl@1a24b74MainActivity: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=16 res=0x1 s={true -5476376666927538176} ch=false fn=24
I/ViewRootImpl@1a24b74MainActivity: updateBoundsLayer: shouldReparent = false t = android.view.SurfaceControl$Transaction@236466e sc = Surface(name=Bounds for - com.fairfieldmarketplace.app_dev/com.fairfieldmarketplace.app.MainActivity@0)/@0x1a5b10f frame = 24
V/FA (12382): Screen exposed for less than 1000 ms. Event not sent. time: 62
V/FA (12382): Activity paused, time: 362352350
I/ViewRootImpl@1a24b74MainActivity: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(12382): prepareNavigationBarInfo() DecorView@c7f4ac8[MainActivity]
D/InputMethodManager(12382): getNavigationBarColor() -855310
D/InputMethodManager(12382): prepareNavigationBarInfo() DecorView@c7f4ac8[MainActivity]
D/InputMethodManager(12382): getNavigationBarColor() -855310
V/InputMethodManager(12382): Starting input: tba=com.fairfieldmarketplace.app_dev ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(12382): startInputInner - Id : 0
I/InputMethodManager(12382): startInputInner - mService.startInputOrWindowGainedFocus
I/ViewRootImpl@1a24b74MainActivity: MSG_WINDOW_FOCUS_CHANGED 0 1
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376666781309920]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376666781309920]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669281918848]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669281918848]
I/ViewRootImpl@1a24b74MainActivity: stopped(false) old=false
V/FA (12382): Activity resumed, time: 362353120
D/permissions_handler(12382): No android specific permissions needed for: 9
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669237222720]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669237222720]
I/SurfaceControl(12382): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x6833199 / android.view.SurfaceControl.readFromParcel:1117 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
I/ViewRootImpl@1a24b74MainActivity: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=6 res=0x1 s={true -5476376666927538176} ch=false fn=25
I/ViewRootImpl@1a24b74MainActivity: updateBoundsLayer: shouldReparent = false t = android.view.SurfaceControl$Transaction@236466e sc = Surface(name=Bounds for - com.fairfieldmarketplace.app_dev/com.fairfieldmarketplace.app.MainActivity@0)/@0x1a5b10f frame = 25
V/OneSignal(12382): Initializing the OneSignal Flutter SDK (3.2.6)
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376666781309920]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376666781309920]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669237222720]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669237222720]
I/flutter (12382): >>> avvio applicazione
D/OneSignal(12382): Adding a task to the pending queue with ID: 1
D/OneSignal(12382): startPendingTasks with task queue quantity: 1
D/OneSignal(12382): OneSignal InAppMessageTracker initInfluencedTypeFromCache: OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}
D/OneSignal(12382): OneSignal NotificationTracker initInfluencedTypeFromCache: OSChannelTracker{tag=notification_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}
D/OneSignal(12382): OneSignal getUnattributedUniqueOutcomeEventsSentByChannel: null
D/OneSignal(12382): Attempted to clean 6 month old IAM data, but none exists!
D/OneSignal(12382): Retrieved IAMs from DB redisplayedInAppMessages: []
I/OneSignal(12382): Last Pending Task has ran, shutting down
W/SQLiteLog(12382): (28) double-quoted string literal: "notification"
W/OneSignal(12382): appContext set, but please call setAppId(appId) with a valid appId to complete OneSignal init!
V/OneSignal(12382): setAppId called with id: 94f0852d-50d9-40dd-986d-c63b800ab731 changing id from: null
V/OneSignal(12382): Starting OneSignal initialization!
V/OneSignal(12382): No class found, not setting up OSRemoteNotificationReceivedHandler
V/OneSignal(12382): OneSignal SDK initialization delayed, waiting for remote params.
D/OneSignal(12382): Starting request to get Android parameters.
D/OneSignal(12382): OneSignalRestClient: Making request to: https://api.onesignal.com/apps/94f0852d-50d9-40dd-986d-c63b800ab731/android_params.js
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
I/ViewRootImpl@1a24b74MainActivity: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(12382): prepareNavigationBarInfo() DecorView@c7f4ac8[MainActivity]
D/InputMethodManager(12382): getNavigationBarColor() -855310
D/InputMethodManager(12382): prepareNavigationBarInfo() DecorView@c7f4ac8[MainActivity]
D/InputMethodManager(12382): getNavigationBarColor() -855310
V/InputMethodManager(12382): Starting input: tba=com.fairfieldmarketplace.app_dev ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(12382): startInputInner - Id : 0
I/InputMethodManager(12382): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport(12382): Input channel constructed: 'ClientS', fd=191
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664232148832]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664232148832]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664232148928]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664232148928]
V/OneSignal(12382): OneSignalRestClient: After con.getResponseCode to: https://api.onesignal.com/apps/94f0852d-50d9-40dd-986d-c63b800ab731/android_params.js
D/OneSignal(12382): OneSignalRestClient: Successfully finished request to: https://api.onesignal.com/apps/94f0852d-50d9-40dd-986d-c63b800ab731/android_params.js
D/OneSignal(12382): OneSignalRestClient: GET RECEIVED JSON: {"awl_list":{},"android_sender_id":"659877383377","chnl_lst":[],"require_email_auth":true,"require_user_id_auth":true,"outcomes":{"direct":{"enabled":false},"indirect":{"notification_attribution":{"minutes_since_displayed":60,"limit":10},"enabled":false},"unattributed":{"enabled":false}},"receive_receipts_enable":false}
D/OneSignal(12382): OneSignalRestClient: Response has etag of W/"5a8cc98860f26e17d3cda11b4ff1504a" so caching the response.
D/OneSignal(12382): OneSignal saveInfluenceParams: InfluenceParams{indirectNotificationAttributionWindow=60, notificationLimit=10, indirectIAMAttributionWindow=1440, iamLimit=10, directEnabled=false, indirectEnabled=false, unattributedEnabled=false}
D/OneSignal(12382): reassignDelayedInitParams with appContext: io.flutter.app.FlutterApplication@dec5605
V/OneSignal(12382): setAppId called with id: 94f0852d-50d9-40dd-986d-c63b800ab731 changing id from: null
V/OneSignal(12382): Starting OneSignal initialization!
V/OneSignal(12382): No class found, not setting up OSRemoteNotificationReceivedHandler
D/OneSignal(12382): OneSignal handleActivityLifecycleHandler inForeground: false
D/OneSignal(12382): App id set for first time: 94f0852d-50d9-40dd-986d-c63b800ab731
D/OneSignal(12382): initWithCachedInAppMessages: null
D/OneSignal(12382): LocationController sendAndClearPromptHandlers from non prompt flow
D/OneSignal(12382): LocationController startGetLocation with lastLocation: null
W/OneSignal(12382): LocationController startGetLocation not possible, no location dependency found
D/OneSignal(12382): registerUser:registerForPushFired:false, locationFired: true, remoteParams: com.onesignal.OneSignalRemoteParams$2@672e1e8, appId: 94f0852d-50d9-40dd-986d-c63b800ab731
D/OneSignal(12382): registerUser not possible
V/OneSignal(12382): OneSignal SDK initialization done.
D/OneSignal(12382): startPendingTasks with task queue quantity: 0
I/FirebaseApp(12382): Device unlocked: initializing all Firebase APIs for app ONESIGNAL_SDK_FCM_APP_NAME
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
W/etplace.app_de(12382): Long monitor contention with owner Firebase-Messaging-Init (22267) at com.google.android.gms.tasks.Task com.google.firebase.messaging.RequestDeduplicator.getOrStartGetTokenRequest(java.lang.String, com.google.firebase.messaging.RequestDeduplicator$GetTokenRequest)(com.google.firebase:firebase-messaging@@23.0.0:8) waiters=0 in com.google.android.gms.tasks.Task com.google.firebase.messaging.RequestDeduplicator.getOrStartGetTokenRequest(java.lang.String, com.google.firebase.messaging.RequestDeduplicator$GetTokenRequest) for 356ms
I/flutter (12382): > passati 1 secondi, token onesignal non ancora ricevuto
I/OneSignal(12382): Device registered, push token = do-Tm1RmQb-ypAzBaUvmdJ:APA91bFePQ6ZVMDQdQllteAGDOO08b-bKP3zb940cQ-nbA4USLZ1WNCV4b-9VCPfhlmTGjeBusrBPKV6Oz8TYSkKSbeZboHmcRH9-JFt
-WlcTSpuxSnokE5rCufizTfoKx2o7l6u5hU
D/OneSignal(12382): registerForPushToken completed with id: do-Tm1RmQb-ypAzBaUvmdJ:APA91bFePQ6ZVMDQdQllteAGDOO08b-bKP3zb940cQ-nbA4USLZ1WNCV4b-9VCPfhlmTGjeBusrBPKV6Oz8TYSkKSbeZboHmcRH9-JFt_-WlcTSpuxSnokE5rCufizTfoKx2o7l6u5hU status: 1
D/OneSignal(12382): registerUser:registerForPushFired:true, locationFired: true, remoteParams: com.onesignal.OneSignalRemoteParams$2@672e1e8, appId: 94f0852d-50d9-40dd-986d-c63b800ab731
D/OneSignal(12382): registerUserTask calling readyToUpdate
I/flutter (12382): > passati 2 secondi, token onesignal non ancora ricevuto
I/flutter (12382): > passati 3 secondi, token onesignal non ancora ricevuto
I/flutter (12382): > passati 4 secondi, token onesignal non ancora ricevuto
V/FA (12382): Inactivity, disconnecting from the service
I/flutter (12382): > passati 5 secondi, token onesignal non ancora ricevuto
I/flutter (12382): > passati 6 secondi, token onesignal non ancora ricevuto

^^^^^^ famous 6 seconds to wait to receive the playerid

D/OneSignal(12382): UserStateSynchronizer internalSyncUserState from session call: true jsonBody: {"app_id":"94f0852d-50d9-40dd-986d-c63b800ab731","device_os":"11","timezone":3600,"timezone_id":"Europe/Rome","language":"it","sdk":"040603","sdk_type":"flutter","android_package":"com.fairfieldmarketplace.app_dev","device_model":"SM-A325F","game_version":11,"net_type":0,"carrier":"Iliad","rooted":false,"identifier":"do-Tm1RmQb-ypAzBaUvmdJ:APA91bFePQ6ZVMDQdQllteAGDOO08b-bKP3zb940cQ-nbA4USLZ1WNCV4b-9VCPfhlmTGjeBusrBPKV6Oz8TYSkKSbeZboHmcRH9-JFt_-WlcTSpuxSnokE5rCufizTfoKx2o7l6u5hU","device_type":1}
D/OneSignal(12382): OneSignalRestClient: Making request to: https://api.onesignal.com/players
D/OneSignal(12382): OneSignalRestClient: POST SEND JSON: {"app_id":"94f0852d-50d9-40dd-986d-c63b800ab731","device_os":"11","timezone":3600,"timezone_id":"Europe/Rome","language":"it","sdk":"040603","sdk_type":"flutter","android_package":"com.fairfieldmarketplace.app_dev","device_model":"SM-A325F","game_version":11,"net_type":0,"carrier":"Iliad","rooted":false,"identifier":"do-Tm1RmQb-ypAzBaUvmdJ:APA91bFePQ6ZVMDQdQllteAGDOO08b-bKP3zb940cQ-nbA4USLZ1WNCV4b-9VCPfhlmTGjeBusrBPKV6Oz8TYSkKSbeZboHmcRH9-JFt_-WlcTSpuxSnokE5rCufizTfoKx2o7l6u5hU","device_type":1}
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
V/OneSignal(12382): OneSignalRestClient: After con.getResponseCode to: https://api.onesignal.com/players
D/OneSignal(12382): OneSignalRestClient: Successfully finished request to: https://api.onesignal.com/players
D/OneSignal(12382): OneSignalRestClient: POST RECEIVED JSON: {"success":true,"id":"d2df6d55-189f-4286-a664-96b328641f8d"}
D/OneSignal(12382): doCreateOrNewSession:response: {"success":true,"id":"d2df6d55-189f-4286-a664-96b328641f8d"}
I/OneSignal(12382): Device registered, UserId = d2df6d55-189f-4286-a664-96b328641f8d
I/flutter (12382): Token di OneSignal d2df6d55-189f-4286-a664-96b328641f8d
I/flutter (12382): Custom Web Header Android,RP1A.200720.012.A325FXXU1AUH1,1.0.1-dev_build-11,d2df6d55-189f-4286-a664-96b328641f8d
I/flutter (12382): Used api link is: https://dev.fairfieldmarketplace.com/
E/OneSignal(12382): promptPermission() is not applicable in Android
W/etplace.app_de(12382): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, reflection, allowed)
W/etplace.app_de(12382): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, reflection, allowed)
W/etplace.app_de(12382): Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, reflection, allowed)
I/System.out(12382): recordForce value 6
D/libMEOW (12382): applied 1 plugins for [com.fairfieldmarketplace.app_dev]:
D/libMEOW (12382): plugin 1: [libMEOW_gift.so]:
W/etplace.app_de(12382): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
I/libMEOW_gift(12382): ctx:0xb400006fc91cd6b0, ARC not Enabled.
W/cr_media(12382): Requires BLUETOOTH permission
I/libMEOW_gift(12382): ctx:0xb400006fc91cd6b0, ARC not Enabled.
I/flutter (12382): Permessi accettati: false
I/flutter (12382): ReduxPage2 didUpdateWidget HomePage
I/flutter (12382): chiamo url : https://dev.fairfieldmarketplace.com/
I/flutter (12382): onPageCommitVisible https://dev.fairfieldmarketplace.com/ https://dev.fairfieldmarketplace.com/
I/flutter (12382): ReduxPage2 didUpdateWidget HomePage
I/flutter (12382): > Timed Out
I/flutter (12382): ReduxPage2 didUpdateWidget HomePage
I/flutter (12382): ReduxPage2 didUpdateWidget HomePage
D/OneSignal(12382): UserStateSynchronizer internalSyncUserState from session call: false jsonBody: null
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
I/etplace.app_de(12382): NativeAlloc concurrent copying GC freed 659(64KB) AllocSpace objects, 32(1368KB) LOS objects, 49% free, 4291KB/8583KB, paused 288us total 104.884ms
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme pointer 0
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme pointer 1
I/etplace.app_de(12382): NativeAlloc concurrent copying GC freed 4855(279KB) AllocSpace objects, 2(104KB) LOS objects, 49% free, 4078KB/8157KB, paused 176us total 110.657ms
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme pointer 0
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme pointer 1
D/InputMethodManager(12382): prepareNavigationBarInfo() DecorView@c7f4ac8[MainActivity]
D/InputMethodManager(12382): getNavigationBarColor() -855310
V/InputMethodManager(12382): Starting input: tba=com.fairfieldmarketplace.app_dev ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(12382): startInputInner - Id : 0
I/InputMethodManager(12382): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport(12382): Input channel constructed: 'ClientS', fd=261
D/InputTransport(12382): Input channel destroyed: 'ClientS', fd=191
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
D/InputMethodManager(12382): HSIFW - flag : 0
V/OneSignal(12382): initWithContext called with: android.app.ReceiverRestrictedContext@d6d81b
V/OneSignal(12382): Starting OneSignal initialization!
V/OneSignal(12382): No class found, not setting up OSRemoteNotificationReceivedHandler
D/OneSignal(12382): OneSignal SDK initialization already completed.
D/OneSignal(12382): OSNotificationWorkManager enqueueing notification work with notificationId: 457af1a2-934b-4389-ba72-c3de42af8af2 and jsonPayload: {"google.delivered_priority":"normal","google.sent_time":1637092582765,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"457af1a2-934b-4389-ba72-c3de42af8af2"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092582782417%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}
D/OneSignal(12382): NotificationWorker running doWork with data: Data {json_payload : {"google.delivered_priority":"normal","google.sent_time":1637092582765,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"457af1a2-934b-4389-ba72-c3de42af8af2"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092582782417%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}, android_notif_id : 0, is_restoring : false, timestamp : 1637092582, }

^^^^^^^ first notification received just after installing the app for the first time

D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@452777e
D/OneSignal(12382): Running startTimeout with timeout: 25000 and runnable: com.onesignal.OSNotificationReceivedEvent$1@452777e
W/OneSignal(12382): remoteNotificationReceivedHandler not setup, displaying normal OneSignal notification
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@452777e
D/OneSignal(12382): Starting processJobForDisplay opened: false fromBackgroundLogic: true
I/OneSignal(12382): App is in background, show notification
D/OneSignal(12382): Saving Notification job: OSNotificationGenerationJob{jsonPayload={"google.delivered_priority":"normal","google.sent_time":1637092582765,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"457af1a2-934b-4389-ba72-c3de42af8af2"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092582782417%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}, isRestoring=false, shownTimeStamp=1637092582, overriddenBodyFromExtender=null, overriddenTitleFromExtender=null, overriddenSound=null, overriddenFlags=null, orgFlags=null, orgSound=null, notification=OSNotification{notificationExtender=null, groupedNotifications=null, androidNotificationId=8878946, notificationId='457af1a2-934b-4389-ba72-c3de42af8af2', templateName='', templateId='', title='Test notifica', body='Test notifica', additionalData={"pagina":"https://www.nexid.it","etichetta":"Prova"}, smallIcon='null', largeIcon='null', bigPicture='null', smallIconAccentColor='null', launchURL='null', sound='null', ledColor='null', lockScreenVisibility=1, groupKey='null', groupMessage='null', actionButtons=null, fromProjectNumber='659877383377', backgroundImageLayout=null, collapseId='null', priority=5, rawPayload='{"google.delivered_priority":"normal","google.sent_time":1637092582765,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"457af1a2-934b-4389-ba72-c3de42af8af2"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092582782417%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}'}}
D/OneSignal(12382): Notification saved values: full_data={"google.delivered_priority":"normal","google.sent_time":1637092582765,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"457af1a2-934b-4389-ba72-c3de42af8af2"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092582782417%f390618bf9fd7ecd","google.c.sender.id":"659877383377"} notification_id=457af1a2-934b-4389-ba72-c3de42af8af2 android_notification_id=8878946 opened=0 expire_time=1637351782 title=Test notifica message=Test notifica
D/OneSignal(12382): sendReceiveReceipt disabled
D/OneSignal(12382): OneSignal SessionManager onNotificationReceived notificationId: 457af1a2-934b-4389-ba72-c3de42af8af2
D/OneSignal(12382): OneSignal OSChannelTracker for: notification_id saveLastId: 457af1a2-934b-4389-ba72-c3de42af8af2
D/OneSignal(12382): OneSignal OSChannelTracker for: notification_id saveLastId with lastChannelObjectsReceived: []
D/OneSignal(12382): OneSignal OSChannelTracker for: notification_id with channelObjectToSave: [{"notification_id":"457af1a2-934b-4389-ba72-c3de42af8af2","time":1637092582207}]
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@7392818
D/OneSignal(12382): Running startTimeout with timeout: 5000 and runnable: com.onesignal.OSNotificationOpenedResult$1@7392818
I/WM-WorkerWrapper(12382): Worker result SUCCESS for Work [ id=8842cc7d-8cec-467e-ba32-6c8fecc48eab, tags={ com.onesignal.OSNotificationWorkManager$NotificationWorker } ]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664230193792]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664230193792]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664230195232]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664230195232]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664232146432]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664232146432]
I/ViewRootImpl@1a24b74MainActivity: MSG_WINDOW_FOCUS_CHANGED 0 1
D/OneSignal(12382): onActivityPaused: com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): curActivity is NOW: null
I/ViewRootImpl@1a24b74MainActivity: stopped(false) old=false
I/flutter (12382): App non attiva
D/OneSignal(12382): onActivityResumed: com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): curActivity is NOW: com.fairfieldmarketplace.app.MainActivity:com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): ActivityLifecycleHandler handleFocus, with runnable: null nextResumeIsFirstActivity: true
D/OneSignal(12382): ActivityLifecycleHandler reset background state, call app focus
D/OneSignal(12382): Application on focus
V/FA (12382): Recording user engagement, ms: 184116
D/OneSignal(12382): Application foregrounded focus time: 362537250
D/OneSignal(12382): isPastOnSessionTime currentTimeMillis: 1637092585787 lastSessionTime: -31000 difference: 1637092616787
D/OneSignal(12382): Starting new session with appEntryState: APP_OPEN
D/OneSignal(12382): OneSignal cleanOutcomes for session
D/OneSignal(12382): OneSignal save unattributedUniqueOutcomeEvents: []
D/OneSignal(12382): OneSignal SessionManager restartSessionIfNeeded with entryAction: APP_OPEN
D/OneSignal(12382): channelTrackers: [OSChannelTracker{tag=notification_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}, OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}]
D/OneSignal(12382): OneSignal ChannelTracker getLastReceivedIds lastChannelObjectReceived: [{"notification_id":"457af1a2-934b-4389-ba72-c3de42af8af2","time":1637092582207}]
D/OneSignal(12382): OneSignal SessionManager restartSessionIfNeeded lastIds: ["457af1a2-934b-4389-ba72-c3de42af8af2"]
D/OneSignal(12382): OSChannelTracker changed: notification_id
D/OneSignal(12382): from:
D/OneSignal(12382): influenceType: UNATTRIBUTED, directNotificationId: null, indirectNotificationIds: null
D/OneSignal(12382): to:
D/OneSignal(12382): influenceType: INDIRECT, directNotificationId: null, indirectNotificationIds: ["457af1a2-934b-4389-ba72-c3de42af8af2"]
D/OneSignal(12382): Trackers changed to: [OSChannelTracker{tag=notification_id, influenceType=INDIRECT, indirectIds=["457af1a2-934b-4389-ba72-c3de42af8af2"], directId=null}, OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}]
D/OneSignal(12382): OneSignal ChannelTracker getLastReceivedIds lastChannelObjectReceived: []
D/OneSignal(12382): OneSignal SessionManager restartSessionIfNeeded lastIds: []
D/OneSignal(12382): OneSignal SessionManager sendSessionEndingWithInfluences with influences: [SessionInfluence{influenceChannel=notification, influenceType=DISABLED, ids=null}]
D/OneSignal(12382): Last session time set to: 1637092585807
D/OneSignal(12382): OneSignal cleanOutcomes for session
D/OneSignal(12382): OneSignal save unattributedUniqueOutcomeEvents: []
D/OneSignal(12382): initWithCachedInAppMessages: null
D/OneSignal(12382): FocusTimeProcessorUnattributed sendTime with: END_SESSION
D/OneSignal(12382): LocationController sendAndClearPromptHandlers from non prompt flow
D/OneSignal(12382): LocationController startGetLocation with lastLocation: null
W/OneSignal(12382): LocationController startGetLocation not possible, no location dependency found
D/OneSignal(12382): registerUser:registerForPushFired:true, locationFired: true, remoteParams: com.onesignal.OneSignalRemoteParams$2@672e1e8, appId: 94f0852d-50d9-40dd-986d-c63b800ab731
I/OneSignal(12382): Device registered, push token = do-Tm1RmQb-ypAzBaUvmdJ:APA91bFePQ6ZVMDQdQllteAGDOO08b-bKP3zb940cQ-nbA4USLZ1WNCV4b-9VCPfhlmTGjeBusrBPKV6Oz8TYSkKSbeZboHmcRH9-JFt_-WlcTSpuxSnokE5rCufizTfoKx2o7l6u5hU
D/OneSignal(12382): registerForPushToken completed with id: do-Tm1RmQb-ypAzBaUvmdJ:APA91bFePQ6ZVMDQdQllteAGDOO08b-bKP3zb940cQ-nbA4USLZ1WNCV4b-9VCPfhlmTGjeBusrBPKV6Oz8TYSkKSbeZboHmcRH9-JFt_-WlcTSpuxSnokE5rCufizTfoKx2o7l6u5hU status: 1
V/FA (12382): Connecting to remote service
D/OneSignal(12382): registerUser:registerForPushFired:true, locationFired: true, remoteParams: com.onesignal.OneSignalRemoteParams$2@672e1e8, appId: 94f0852d-50d9-40dd-986d-c63b800ab731
D/OneSignal(12382): LocationController scheduleUpdate lastTime: 8 minTime: 300000
V/OneSignal(12382): OSSyncService scheduleLocationUpdateTask:delayMs: 299992
V/OneSignal(12382): OSBackgroundSync scheduleSyncServiceAsJob:atTime: 299992
D/OneSignal(12382): registerUserTask calling readyToUpdate
V/FA (12382): Connection attempt already in progress
V/FA (12382): Activity paused, time: 362537238
D/OneSignal(12382): registerUserTask calling readyToUpdate
V/FA (12382): Activity resumed, time: 362537240
V/FA (12382): Connection attempt already in progress
I/OneSignal(12382): OSBackgroundSync scheduleSyncServiceAsJob:result: 1
I/flutter (12382): App resumed
D/OneSignal(12382): onActivityPaused: com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): ActivityLifecycleHandler Handling lost focus
D/OneSignal(12382): Application stopped focus time: 362537250 timeElapsed: null
V/OneSignal(12382): OSFocusDelaySync scheduleSyncTask:SYNC_AFTER_BG_DELAY_MS: 2000
V/OneSignal(12382): OSBackgroundSync scheduleSyncServiceAsJob:atTime: 2000
V/FA (12382): Screen exposed for less than 1000 ms. Event not sent. time: 87
V/FA (12382): Connection attempt already in progress
V/FA (12382): Activity paused, time: 362537329
I/OneSignal(12382): OSBackgroundSync scheduleSyncServiceAsJob:result: 1
D/OneSignal(12382): curActivity is NOW: null
I/flutter (12382): App non attiva
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669237222624]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669237222624]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669281918848]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669281918848]
I/SurfaceControl(12382): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x6833199 / android.view.SurfaceControl.readFromParcel:1117 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669237222144]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669237222144]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669237223872]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669237223872]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376666781303104]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376666781303104]
I/ViewRootImpl@1a24b74MainActivity: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=9 res=0x1 s={true -5476376666927538176} ch=false fn=110
I/ViewRootImpl@1a24b74MainActivity: updateBoundsLayer: shouldReparent = false t = android.view.SurfaceControl$Transaction@236466e sc = Surface(name=Bounds for - com.fairfieldmarketplace.app_dev/com.fairfieldmarketplace.app.MainActivity@0)/@0x1a5b10f frame = 110
I/ViewRootImpl@1a24b74MainActivity: MSG_WINDOW_FOCUS_CHANGED 0 1
D/libMEOW (12382): applied 1 plugins for [com.fairfieldmarketplace.app_dev]:
D/libMEOW (12382): plugin 1: [libMEOW_gift.so]:
V/FA (12382): onActivityCreated
V/OneSignal(12382): initWithContext called with: io.flutter.app.FlutterApplication@dec5605
V/OneSignal(12382): Starting OneSignal initialization!
V/OneSignal(12382): No class found, not setting up OSRemoteNotificationReceivedHandler
D/OneSignal(12382): OneSignal SDK initialization already completed.
D/OneSignal(12382): processIntent from context: com.onesignal.NotificationOpenedReceiver@e975deb and intent: Intent { flg=0x24800000 cmp=com.fairfieldmarketplace.app_dev/com.onesignal.NotificationOpenedReceiver (has extras) }
D/OneSignal(12382): processIntent intent extras: Bundle[{androidNotificationId=8878946, onesignalData={"google.delivered_priority":"normal","google.sent_time":1637092582765,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"457af1a2-934b-4389-ba72-c3de42af8af2"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092582782417%f390618bf9fd7ecd","google.c.sender.id":"659877383377","androidNotificationId":8878946}}]
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@3d2c748
D/OneSignal(12382): Running startTimeout with timeout: 5000 and runnable: com.onesignal.OSNotificationOpenedResult$1@3d2c748
D/onesignal(12382): Created json raw payload: {fromProjectNumber=659877383377, androidNotificationId=8878946, rawPayload={"google.delivered_priority":"normal","google.sent_time":1637092582765,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"457af1a2-934b-4389-ba72-c3de42af8af2"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092582782417%f390618bf9fd7ecd","google.c.sender.id":"659877383377","androidNotificationId":8878946}, lockScreenVisibility=1, notificationId=457af1a2-934b-4389-ba72-c3de42af8af2, additionalData={pagina=https://www.nexid.it, etichetta=Prova}, title=Test notifica, body=Test notifica, priority=5}
D/OneSignal(12382): OneSignalRestClient: Making request to: https://api.onesignal.com/notifications/457af1a2-934b-4389-ba72-c3de42af8af2
D/OneSignal(12382): OneSignalRestClient: PUT SEND JSON: {"app_id":"94f0852d-50d9-40dd-986d-c63b800ab731","player_id":"d2df6d55-189f-4286-a664-96b328641f8d","opened":true,"device_type":1}
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
I/DecorView(12382): [INFO] isPopOver=false, config=true
I/DecorView(12382): updateCaptionType >> DecorView@3f10ff4[], isFloating=false, isApplication=true, hasWindowDecorCaption=false, hasWindowControllerCallback=true
D/DecorView(12382): setCaptionType = 0, this = DecorView@3f10ff4[]
I/ViewRootImpl@1a24b74MainActivity: MSG_WINDOW_FOCUS_CHANGED 0 1
I/OneSignal(12382): Restoring notifications
I/OneSignal(12382): Querying DB for notifications to restore: created_time > 1636487786 AND dismissed = 0 AND opened = 0 AND is_summary = 0 AND expire_time > 1637092586
I/flutter (12382): Hai aperto la notifica:
I/flutter (12382): {
I/flutter (12382): "google.delivered_priority": "normal",
I/flutter (12382): "google.sent_time": 1637092582765,
I/flutter (12382): "google.ttl": 259200,
I/flutter (12382): "google.original_priority": "normal",
I/flutter (12382): "custom": "{"a":{"pagina":"https://www.nexid.it","etichetta":"Prova"},"i":"457af1a2-934b-4389-ba72-c3de42af8af2"}",
I/flutter (12382): "pri": "5",
I/flutter (12382): "vis": "1",
I/flutter (12382): "from": "659877383377",
I/flutter (12382): "alert": "Test notifica",
I/flutter (12382): "title": "Test notifica",
I/flutter (12382): "google.message_id": "0:1637092582782417%f390618bf9fd7ecd",
I/flutter (12382): "google.c.sender.id": "659877383377",
I/flutter (12382): "androidNotificationId": 8878946
I/flutter (12382): }

^^^^^^^ Clicked the notification (in the notification area of ​​the phone)

I/WM-WorkerWrapper(12382): Worker result SUCCESS for Work [ id=e0f2a3de-3df1-46d3-b271-0b9417657d3c, tags={ com.onesignal.OSNotificationRestoreWorkManager$NotificationRestoreWorker } ]
D/FA (12382): Connected to remote service
I/ViewRootImpl@1a24b74MainActivity: stopped(false) old=false
V/FA (12382): Processing queued up service tasks: 4
D/OneSignal(12382): onActivityResumed: com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): curActivity is NOW: com.fairfieldmarketplace.app.MainActivity:com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): ActivityLifecycleHandler handleFocus, with runnable: null nextResumeIsFirstActivity: false
D/OneSignal(12382): ActivityLifecycleHandler cancel background lost focus sync task
D/OneSignal(12382): OSFocusDelaySync cancel background sync
V/FA (12382): Activity resumed, time: 362537579
V/OneSignal(12382): OneSignalRestClient: After con.getResponseCode to: https://api.onesignal.com/notifications/457af1a2-934b-4389-ba72-c3de42af8af2
D/OneSignal(12382): OneSignalRestClient: Successfully finished request to: https://api.onesignal.com/notifications/457af1a2-934b-4389-ba72-c3de42af8af2
I/flutter (12382): App resumed
D/OneSignal(12382): OneSignalRestClient: PUT RECEIVED JSON: {"success":true}
D/OneSignal(12382): onActivityDestroyed: com.onesignal.NotificationOpenedReceiver@e975deb
D/OneSignal(12382): curActivity is NOW: com.fairfieldmarketplace.app.MainActivity:com.fairfieldmarketplace.app.MainActivity@1fe09f4
I/ViewRootImpl@1a24b74MainActivity: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(12382): prepareNavigationBarInfo() DecorView@c7f4ac8[MainActivity]
D/InputMethodManager(12382): getNavigationBarColor() -855310
D/InputMethodManager(12382): prepareNavigationBarInfo() DecorView@c7f4ac8[MainActivity]
D/InputMethodManager(12382): getNavigationBarColor() -855310
V/InputMethodManager(12382): Starting input: tba=com.fairfieldmarketplace.app_dev ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(12382): startInputInner - Id : 0
I/InputMethodManager(12382): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport(12382): Input channel constructed: 'ClientS', fd=262
D/InputTransport(12382): Input channel destroyed: 'ClientS', fd=261
D/OneSignal(12382): Running complete from OSNotificationOpenedResult timeout runnable!
D/OneSignal(12382): OSNotificationOpenedResult complete called with opened: false
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@7392818
I/flutter (12382): chiamo url : https://nexid.it/
I/flutter (12382): onPageCommitVisible https://nexid.it/ https://nexid.it/
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme key 0
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme key 1
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
D/OneSignal(12382): UserStateSynchronizer internalSyncUserState from session call: true jsonBody: {"app_id":"94f0852d-50d9-40dd-986d-c63b800ab731"}
D/OneSignal(12382): OneSignalRestClient: Making request to: https://api.onesignal.com/players/d2df6d55-189f-4286-a664-96b328641f8d/on_session
D/OneSignal(12382): OneSignalRestClient: POST SEND JSON: {"app_id":"94f0852d-50d9-40dd-986d-c63b800ab731"}
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(12382): (HTTPLog)-Static: isSBSettingEnabled false
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
D/OneSignal(12382): Running complete from OSNotificationOpenedResult timeout runnable!
D/OneSignal(12382): OSNotificationOpenedResult complete called with opened: false
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@3d2c748
V/OneSignal(12382): OneSignalRestClient: After con.getResponseCode to: https://api.onesignal.com/players/d2df6d55-189f-4286-a664-96b328641f8d/on_session
D/OneSignal(12382): OneSignalRestClient: Successfully finished request to: https://api.onesignal.com/players/d2df6d55-189f-4286-a664-96b328641f8d/on_session
D/OneSignal(12382): OneSignalRestClient: POST RECEIVED JSON: {"success":true,"id":"d2df6d55-189f-4286-a664-96b328641f8d"}
D/OneSignal(12382): doCreateOrNewSession:response: {"success":true,"id":"d2df6d55-189f-4286-a664-96b328641f8d"}
I/OneSignal(12382): Device registered, UserId = d2df6d55-189f-4286-a664-96b328641f8d
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
V/FA (12382): Inactivity, disconnecting from the service
I/flutter (12382): chiamo url : https://dev.fairfieldmarketplace.com/login
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme key 0
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme key 1
I/flutter (12382): onPageCommitVisible https://dev.fairfieldmarketplace.com/login https://dev.fairfieldmarketplace.com/
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
E/GPUAUX (12382): [AUX]GuiExtAuxCheckAuxPath:630: Null anb
D/OneSignal(12382): UserStateSynchronizer internalSyncUserState from session call: false jsonBody: null
V/OneSignal(12382): initWithContext called with: android.app.ReceiverRestrictedContext@d6d81b
V/OneSignal(12382): Starting OneSignal initialization!
V/OneSignal(12382): No class found, not setting up OSRemoteNotificationReceivedHandler
D/OneSignal(12382): OneSignal SDK initialization already completed.
D/OneSignal(12382): OSNotificationWorkManager enqueueing notification work with notificationId: 625914cf-0ef5-429a-aeb6-0e94c97ff164 and jsonPayload: {"google.delivered_priority":"normal","google.sent_time":1637092599439,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"625914cf-0ef5-429a-aeb6-0e94c97ff164"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092599453725%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}
D/OneSignal(12382): NotificationWorker running doWork with data: Data {json_payload : {"google.delivered_priority":"normal","google.sent_time":1637092599439,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"625914cf-0ef5-429a-aeb6-0e94c97ff164"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092599453725%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}, android_notif_id : 0, is_restoring : false, timestamp : 1637092598, }
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@97109ed
D/OneSignal(12382): Running startTimeout with timeout: 25000 and runnable: com.onesignal.OSNotificationReceivedEvent$1@97109ed
W/OneSignal(12382): remoteNotificationReceivedHandler not setup, displaying normal OneSignal notification
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@97109ed
D/OneSignal(12382): Starting processJobForDisplay opened: false fromBackgroundLogic: true
I/OneSignal(12382): Fire notificationWillShowInForegroundHandler
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@75a022
D/OneSignal(12382): Running startTimeout with timeout: 25000 and runnable: com.onesignal.OSNotificationReceivedEvent$1@75a022
D/onesignal(12382): Created json raw payload: {fromProjectNumber=659877383377, androidNotificationId=-1781700768, rawPayload={"google.delivered_priority":"normal","google.sent_time":1637092599439,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"625914cf-0ef5-429a-aeb6-0e94c97ff164"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092599453725%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}, lockScreenVisibility=1, notificationId=625914cf-0ef5-429a-aeb6-0e94c97ff164, additionalData={pagina=https://www.nexid.it, etichetta=Prova}, title=Test notifica, body=Test notifica, priority=5}
I/WM-WorkerWrapper(12382): Worker result SUCCESS for Work [ id=60266ea1-07f7-4258-8726-763654205cf1, tags={ com.onesignal.OSNotificationWorkManager$NotificationWorker } ]
I/flutter (12382): Hai ricevuto la notifica:
I/flutter (12382): {
I/flutter (12382): "google.delivered_priority": "normal",
I/flutter (12382): "google.sent_time": 1637092599439,
I/flutter (12382): "google.ttl": 259200,
I/flutter (12382): "google.original_priority": "normal",
I/flutter (12382): "custom": "{"a":{"pagina":"https://www.nexid.it","etichetta":"Prova"},"i":"625914cf-0ef5-429a-aeb6-0e94c97ff164"}",
I/flutter (12382): "pri": "5",
I/flutter (12382): "vis": "1",
I/flutter (12382): "from": "659877383377",
I/flutter (12382): "alert": "Test notifica",
I/flutter (12382): "title": "Test notifica",
I/flutter (12382): "google.message_id": "0:1637092599453725%f390618bf9fd7ecd",
I/flutter (12382): "google.c.sender.id": "659877383377"
I/flutter (12382): }
I/flutter (12382): Pagina La PAGINA https://www.nexid.it
I/flutter (12382): Etichetta La ETICHETTA Prova
I/flutter (12382): Etichetta :Prova
I/flutter (12382): Destinazione :https://www.nexid.it
I/flutter (12382): Titolo :Test notifica
I/flutter (12382): Sottotitolo :
I/flutter (12382): Corpo :Test notifica
I/flutter (12382): Lodevomostrare :true

^^^^^^^^ after the first notification received with the app in the foreground all the others (even when you have closed the application), all come from setNotificationWillShowInForegroundHandler

I/flutter (12382): OSNotificationReceivedEvent complete with notification: null
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@75a022
D/OneSignal(12382): Saving Notification job: OSNotificationGenerationJob{jsonPayload={"google.delivered_priority":"normal","google.sent_time":1637092599439,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"625914cf-0ef5-429a-aeb6-0e94c97ff164"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092599453725%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}, isRestoring=false, shownTimeStamp=1637092598, overriddenBodyFromExtender=null, overriddenTitleFromExtender=null, overriddenSound=null, overriddenFlags=null, orgFlags=null, orgSound=null, notification=OSNotification{notificationExtender=null, groupedNotifications=null, androidNotificationId=-1, notificationId='625914cf-0ef5-429a-aeb6-0e94c97ff164', templateName='', templateId='', title='Test notifica', body='Test notifica', additionalData={"pagina":"https://www.nexid.it","etichetta":"Prova"}, smallIcon='null', largeIcon='null', bigPicture='null', smallIconAccentColor='null', launchURL='null', sound='null', ledColor='null', lockScreenVisibility=1, groupKey='null', groupMessage='null', actionButtons=null, fromProjectNumber='659877383377', backgroundImageLayout=null, collapseId='null', priority=5, rawPayload='{"google.delivered_priority":"normal","google.sent_time":1637092599439,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"625914cf-0ef5-429a-aeb6-0e94c97ff164"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092599453725%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}'}}
D/OneSignal(12382): Notification saved values: full_data={"google.delivered_priority":"normal","google.sent_time":1637092599439,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"625914cf-0ef5-429a-aeb6-0e94c97ff164"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092599453725%f390618bf9fd7ecd","google.c.sender.id":"659877383377"} notification_id=625914cf-0ef5-429a-aeb6-0e94c97ff164 opened=1 expire_time=1637351799 title=Test notifica message=Test notifica
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@c631b21
D/OneSignal(12382): Running startTimeout with timeout: 5000 and runnable: com.onesignal.OSNotificationOpenedResult$1@c631b21
I/etplace.app_de(12382): NativeAlloc concurrent copying GC freed 6876(650KB) AllocSpace objects, 38(1680KB) LOS objects, 49% free, 4375KB/8750KB, paused 181us total 112.338ms
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme pointer 0
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme pointer 1
D/OneSignal(12382): Running complete from OSNotificationOpenedResult timeout runnable!
D/OneSignal(12382): OSNotificationOpenedResult complete called with opened: false
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@c631b21
V/OneSignal(12382): initWithContext called with: android.app.ReceiverRestrictedContext@d6d81b
V/OneSignal(12382): Starting OneSignal initialization!
V/OneSignal(12382): No class found, not setting up OSRemoteNotificationReceivedHandler
D/OneSignal(12382): OneSignal SDK initialization already completed.
D/OneSignal(12382): OSNotificationWorkManager enqueueing notification work with notificationId: 37854774-de94-4c37-9e88-58d0cf103260 and jsonPayload: {"google.delivered_priority":"normal","google.sent_time":1637092605614,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"37854774-de94-4c37-9e88-58d0cf103260"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092605629200%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}
D/OneSignal(12382): NotificationWorker running doWork with data: Data {json_payload : {"google.delivered_priority":"normal","google.sent_time":1637092605614,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"37854774-de94-4c37-9e88-58d0cf103260"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092605629200%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}, android_notif_id : 0, is_restoring : false, timestamp : 1637092604, }
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@b7d80b8
D/OneSignal(12382): Running startTimeout with timeout: 25000 and runnable: com.onesignal.OSNotificationReceivedEvent$1@b7d80b8
W/OneSignal(12382): remoteNotificationReceivedHandler not setup, displaying normal OneSignal notification
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@b7d80b8
D/OneSignal(12382): Starting processJobForDisplay opened: false fromBackgroundLogic: true
I/OneSignal(12382): Fire notificationWillShowInForegroundHandler
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@7f80e91
D/OneSignal(12382): Running startTimeout with timeout: 25000 and runnable: com.onesignal.OSNotificationReceivedEvent$1@7f80e91
D/onesignal(12382): Created json raw payload: {fromProjectNumber=659877383377, androidNotificationId=-101739338, rawPayload={"google.delivered_priority":"normal","google.sent_time":1637092605614,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"37854774-de94-4c37-9e88-58d0cf103260"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092605629200%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}, lockScreenVisibility=1, notificationId=37854774-de94-4c37-9e88-58d0cf103260, additionalData={pagina=https://www.nexid.it, etichetta=Prova}, title=Test notifica, body=Test notifica, priority=5}
I/WM-WorkerWrapper(12382): Worker result SUCCESS for Work [ id=d4d9a6ce-b548-4b2a-9acb-a2660777b03d, tags={ com.onesignal.OSNotificationWorkManager$NotificationWorker } ]
I/flutter (12382): Hai ricevuto la notifica:
I/flutter (12382): {
I/flutter (12382): "google.delivered_priority": "normal",
I/flutter (12382): "google.sent_time": 1637092605614,
I/flutter (12382): "google.ttl": 259200,
I/flutter (12382): "google.original_priority": "normal",
I/flutter (12382): "custom": "{"a":{"pagina":"https://www.nexid.it","etichetta":"Prova"},"i":"37854774-de94-4c37-9e88-58d0cf103260"}",
I/flutter (12382): "pri": "5",
I/flutter (12382): "vis": "1",
I/flutter (12382): "from": "659877383377",
I/flutter (12382): "alert": "Test notifica",
I/flutter (12382): "title": "Test notifica",
I/flutter (12382): "google.message_id": "0:1637092605629200%f390618bf9fd7ecd",
I/flutter (12382): "google.c.sender.id": "659877383377"
I/flutter (12382): }
I/flutter (12382): Pagina La PAGINA https://www.nexid.it
I/flutter (12382): Etichetta La ETICHETTA Prova
I/flutter (12382): Etichetta :Prova
I/flutter (12382): Destinazione :https://www.nexid.it
I/flutter (12382): Titolo :Test notifica
I/flutter (12382): Sottotitolo :
I/flutter (12382): Corpo :Test notifica
I/flutter (12382): Lodevomostrare :true
I/flutter (12382): OSNotificationReceivedEvent complete with notification: null
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@7f80e91
D/OneSignal(12382): Saving Notification job: OSNotificationGenerationJob{jsonPayload={"google.delivered_priority":"normal","google.sent_time":1637092605614,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"37854774-de94-4c37-9e88-58d0cf103260"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092605629200%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}, isRestoring=false, shownTimeStamp=1637092604, overriddenBodyFromExtender=null, overriddenTitleFromExtender=null, overriddenSound=null, overriddenFlags=null, orgFlags=null, orgSound=null, notification=OSNotification{notificationExtender=null, groupedNotifications=null, androidNotificationId=-1, notificationId='37854774-de94-4c37-9e88-58d0cf103260', templateName='', templateId='', title='Test notifica', body='Test notifica', additionalData={"pagina":"https://www.nexid.it","etichetta":"Prova"}, smallIcon='null', largeIcon='null', bigPicture='null', smallIconAccentColor='null', launchURL='null', sound='null', ledColor='null', lockScreenVisibility=1, groupKey='null', groupMessage='null', actionButtons=null, fromProjectNumber='659877383377', backgroundImageLayout=null, collapseId='null', priority=5, rawPayload='{"google.delivered_priority":"normal","google.sent_time":1637092605614,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"37854774-de94-4c37-9e88-58d0cf103260"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092605629200%f390618bf9fd7ecd","google.c.sender.id":"659877383377"}'}}
D/OneSignal(12382): Notification saved values: full_data={"google.delivered_priority":"normal","google.sent_time":1637092605614,"google.ttl":259200,"google.original_priority":"normal","custom":"{"a":{"pagina":"https:\/\/www.nexid.it","etichetta":"Prova"},"i":"37854774-de94-4c37-9e88-58d0cf103260"}","pri":"5","vis":"1","from":"659877383377","alert":"Test notifica","title":"Test notifica","google.message_id":"0:1637092605629200%f390618bf9fd7ecd","google.c.sender.id":"659877383377"} notification_id=37854774-de94-4c37-9e88-58d0cf103260 opened=1 expire_time=1637351805 title=Test notifica message=Test notifica
D/OneSignal(12382): Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@e5f064
D/OneSignal(12382): Running startTimeout with timeout: 5000 and runnable: com.onesignal.OSNotificationOpenedResult$1@e5f064
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme pointer 0
I/ViewRootImpl@1a24b74MainActivity: ViewPostIme pointer 1
D/OneSignal(12382): onActivityPaused: com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): ActivityLifecycleHandler Handling lost focus
D/OneSignal(12382): Application stopped focus time: 362537250 timeElapsed: 23
D/OneSignal(12382): FocusTimeProcessorUnattributed:saveUnsentActiveData with lastFocusTimeInfluences: [SessionInfluence{influenceChannel=iam, influenceType=DISABLED, ids=null}, SessionInfluence{influenceChannel=notification, influenceType=DISABLED, ids=null}]
D/OneSignal(12382): FocusTimeProcessorUnattributed:getUnsentActiveTime: 0
D/OneSignal(12382): FocusTimeProcessorUnattributed:saveUnsentActiveTime: 23
V/OneSignal(12382): OSFocusDelaySync scheduleSyncTask:SYNC_AFTER_BG_DELAY_MS: 2000
V/OneSignal(12382): OSBackgroundSync scheduleSyncServiceAsJob:atTime: 2000
V/FA (12382): Recording user engagement, ms: 22606
V/FA (12382): Connecting to remote service
I/OneSignal(12382): OSBackgroundSync scheduleSyncServiceAsJob:result: 1
D/OneSignal(12382): curActivity is NOW: null
I/flutter (12382): App non attiva
I/ViewRootImpl@1a24b74MainActivity: MSG_WINDOW_FOCUS_CHANGED 0 1
V/FA (12382): Connection attempt already in progress
V/FA (12382): Activity paused, time: 362560187
D/FA (12382): Connected to remote service
V/FA (12382): Processing queued up service tasks: 2
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669281918848]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669281918848]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664230195232]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664230195232]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664232146432]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664232146432]
D/InputTransport(12382): Input channel destroyed: 'ClientS', fd=262
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376666884941632]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376666884941632]
I/SurfaceView(12382): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{5d0b0e3 V.E...... ........ 0,0-1080,2274} of ViewRootImpl@1a24b74[MainActivity]
I/SurfaceView(12382): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{5d0b0e3 V.E...... ........ 0,0-1080,2274}
I/SurfaceView(12382): remove() from RT android.view.SurfaceView$2@11cd4da Surface(name=SurfaceView - com.fairfieldmarketplace.app_dev/com.fairfieldmarketplace.app.MainActivity@5d0b0e3@0)/@0x811595b
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664230196768]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664230196768]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664230196576]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664230196576]
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376669237222624]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376669237222624]
I/SurfaceControl(12382): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x6ae87e8 / android.view.SurfaceControl.readFromParcel:1117 android.view.IWindowSession$Stub$Proxy.relayout:1810 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
I/SurfaceControl(12382): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x6833199 / android.view.SurfaceControl.readFromParcel:1117 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
I/SurfaceControl(12382): nativeRelease nativeObject s[-5476376664230196672]
I/SurfaceControl(12382): nativeRelease nativeObject e[-5476376664230196672]
I/ViewRootImpl@1a24b74MainActivity: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)8 dur=10 res=0x5 s={false 0} ch=true fn=261
I/SurfaceView(12382): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{5d0b0e3 V.E...... ........ 0,0-1080,2274} of ViewRootImpl@1a24b74[MainActivity]
I/ViewRootImpl@1a24b74MainActivity: stopped(true) old=false
D/OneSignal(12382): onActivityStopped: com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): curActivity is NOW: null
D/OneSignal(12382): onActivityDestroyed: com.fairfieldmarketplace.app.MainActivity@1fe09f4
D/OneSignal(12382): curActivity is NOW: null
Lost connection to device.

@massimilianochiodi
Copy link
Author

I avoid sending you the flutter doctor log.

I still don't have chance to try app on IOS yet. I hope in next few days.

@massimilianochiodi
Copy link
Author

problem is reproduced on all these android models

Android 11 Moto Moto g 10
Android 10 Xiaomi Mi9 Lite
Android 9 Moto Moto e6 Play
Android 6.0.1 Huawei GX8
Android 11 One Xiaomi Mi A3
Android 7.1.1 Sony E6883
Android 11 Samsung A32
Android 10 Lenovo M10 Tab2
Android 6.0.1 Samsung S5

@hugoyair
Copy link

So, android version is not the problem, maybe It´s about lifecycle :/

@nan-li
Copy link
Contributor

nan-li commented Nov 18, 2021

From @marcoberetta96:

Description: The method setNotificationWillShowInForegroundHandler is not triggered for Android when app is active and when receiving a notification like this one.

[
    'contents' => [
        'en' => 'Notification message',
        'title' => 'test',
        'content' => 'hello',
    ],
    'app_id' => self::APP_ID,
    'data' => ['foo' => 'bar'],
    'include_player_ids' => self::PLAYER_IDS,
]

On iOS, the method is triggered and I can decide not to show the notification. On Android the method is not triggered at all.

Environment

  1. What version of the OneSignal Flutter SDK are you using? onesignal_flutter: ^3.2.5
  2. How did you add the SDK to your project? Testing the example

Steps to Reproduce Issue: Just use the example of this project and set the following.

OneSignal.shared.setNotificationWillShowInForegroundHandler((OSNotificationReceivedEvent event) {
      print('setNotificationWillShowInForegroundHandler: $event');
      setState(() => _debugLabelString = "Foreground notification: \n${event.notification.jsonRepresentation().replaceAll("\\n", "\n")}");
     event.complete(null); // Display Notification, send null to not display
    });

Logs when receiving notification on Android

V/OneSignal( 5424): initWithContext called with: android.app.ReceiverRestrictedContext@fc162bb
V/OneSignal( 5424): Starting OneSignal initialization!
V/OneSignal( 5424): No class found, not setting up OSRemoteNotificationReceivedHandler
D/OneSignal( 5424): OneSignal SDK initialization already completed.
D/OneSignal( 5424): OSNotificationWorkManager enqueueing notification work with notificationId: 5b1f182e-374f-4f41-88e8-46f12b288d11 and jsonPayload: {"google.delivered_priority":"normal","google.sent_time":1636813840323,"google.ttl":259200,"google.original_priority":"normal","custom":"{\"a\":{\"foo\":\"bar\"},\"i\":\"5b1f182e-374f-4f41-88e8-46f12b288d11\"}","from":"198414532777","alert":"Notification message","google.message_id":"0:1636813840336424%e1d06f09f9fd7ecd","google.c.sender.id":"198414532777"}
D/OneSignal( 5424): NotificationWorker running doWork with data: Data {json_payload : {"google.delivered_priority":"normal","google.sent_time":1636813840323,"google.ttl":259200,"google.original_priority":"normal","custom":"{\"a\":{\"foo\":\"bar\"},\"i\":\"5b1f182e-374f-4f41-88e8-46f12b288d11\"}","from":"198414532777","alert":"Notification message","google.message_id":"0:1636813840336424%e1d06f09f9fd7ecd","google.c.sender.id":"198414532777"}, android_notif_id : 0, is_restoring : false, os_bnotification_id : 5b1f182e-374f-4f41-88e8-46f12b288d11, timestamp : 1636813840, }
D/OneSignal( 5424): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@f337d58
D/OneSignal( 5424): Running startTimeout with timeout: 25000 and runnable: com.onesignal.OSNotificationReceivedEvent$1@f337d58
W/OneSignal( 5424): remoteNotificationReceivedHandler not setup, displaying normal OneSignal notification
D/OneSignal( 5424): Running destroyTimeout with runnable: com.onesignal.OSNotificationReceivedEvent$1@f337d58
D/OneSignal( 5424): Starting processJobForDisplay opened: false fromBackgroundLogic: true
I/OneSignal( 5424): App is in background, show notification
D/OneSignal( 5424): Saving Notification job: OSNotificationGenerationJob{jsonPayload={"google.delivered_priority":"normal","google.sent_time":1636813840323,"google.ttl":259200,"google.original_priority":"normal","custom":"{\"a\":{\"foo\":\"bar\"},\"i\":\"5b1f182e-374f-4f41-88e8-46f12b288d11\"}","from":"198414532777","alert":"Notification message","google.message_id":"0:1636813840336424%e1d06f09f9fd7ecd","google.c.sender.id":"198414532777"}, isRestoring=false, shownTimeStamp=1636813840, overriddenBodyFromExtender=null, overriddenTitleFromExtender=null, overriddenSound=null, overriddenFlags=null, orgFlags=null, orgSound=null, notification=OSNotification{notificationExtender=null, groupedNotifications=null, androidNotificationId=1270400828, notificationId='5b1f182e-374f-4f41-88e8-46f12b288d11', templateName='', templateId='', title='null', body='Notification message', additionalData={"foo":"bar"}, smallIcon='null', largeIcon='null', bigPicture='null', smallIconAccentColor='null', launchURL='null', sound='null', ledColor='null', lockScreenVisibility=1, groupKey='null', groupMessage='null', actionButtons=null, fromProjectNumber='198414532777', backgroundImageLayout=null, collapseId='null', priority=0, rawPayload='{"google.delivered_priority":"normal","google.sent_time":1636813840323,"google.ttl":259200,"google.original_priority":"normal","custom":"{\"a\":{\"foo\":\"bar\"},\"i\":\"5b1f182e-374f-4f41-88e8-46f12b288d11\"}","from":"198414532777","alert":"Notification message","google.message_id":"0:1636813840336424%e1d06f09f9fd7ecd","google.c.sender.id":"198414532777"}'}}
D/OneSignal( 5424): Notification saved values: full_data={"google.delivered_priority":"normal","google.sent_time":1636813840323,"google.ttl":259200,"google.original_priority":"normal","custom":"{\"a\":{\"foo\":\"bar\"},\"i\":\"5b1f182e-374f-4f41-88e8-46f12b288d11\"}","from":"198414532777","alert":"Notification message","google.message_id":"0:1636813840336424%e1d06f09f9fd7ecd","google.c.sender.id":"198414532777"} notification_id=5b1f182e-374f-4f41-88e8-46f12b288d11 android_notification_id=1270400828 opened=0 expire_time=1637073040 message=Notification message
D/OneSignal( 5424): sendReceiveReceipt disable
D/OneSignal( 5424): Receive receipt ending with success callback completer: androidx.concurrent.futures.CallbackToFutureAdapter$Completer@a706717
D/OneSignal( 5424): OneSignal SessionManager onNotificationReceived notificationId: 5b1f182e-374f-4f41-88e8-46f12b288d11
D/OneSignal( 5424): OneSignal OSChannelTracker for: notification_id saveLastId: 5b1f182e-374f-4f41-88e8-46f12b288d11
D/OneSignal( 5424): OneSignal OSChannelTracker for: notification_id saveLastId with lastChannelObjectsReceived: [{"notification_id":"1aeaf375-afd9-4286-ba64-c5d0364e9c6f","time":1636811236326},{"notification_id":"642bc668-b66b-4d3c-b735-015a80d8d14f","time":1636812593830},{"notification_id":"b5e6105c-5304-40f7-b68c-9c5b8435e127","time":1636813348182},{"notification_id":"9baa97bf-5217-427d-ab04-63ac2ed915c5","time":1636813737131},{"notification_id":"892ac03f-c8e3-4e6f-a627-32ca10fb6ae3","time":1636813821194}]
D/OneSignal( 5424): OneSignal OSChannelTracker for: notification_id with channelObjectToSave: [{"notification_id":"1aeaf375-afd9-4286-ba64-c5d0364e9c6f","time":1636811236326},{"notification_id":"642bc668-b66b-4d3c-b735-015a80d8d14f","time":1636812593830},{"notification_id":"b5e6105c-5304-40f7-b68c-9c5b8435e127","time":1636813348182},{"notification_id":"9baa97bf-5217-427d-ab04-63ac2ed915c5","time":1636813737131},{"notification_id":"892ac03f-c8e3-4e6f-a627-32ca10fb6ae3","time":1636813821194},{"notification_id":"5b1f182e-374f-4f41-88e8-46f12b288d11","time":1636813840100}]
D/OneSignal( 5424): Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@40f1704
I/WM-WorkerWrapper( 5424): Worker result SUCCESS for Work [ id=28e2b88b-b38a-4c7c-8653-81b7235598f9, tags={ com.onesignal.OSNotificationWorkManager$NotificationWorker } ]
D/OneSignal( 5424): Running startTimeout with timeout: 5000 and runnable: com.onesignal.OSNotificationOpenedResult$1@40f1704

Flutter doctor

[✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale en-IT)
    • Flutter version 2.5.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (4 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/marco/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Connected device
    • Nexus 5 (mobile)         • 0811ecba00e4b1c8                         • android-arm    • Android 6.0.1 (API 23)
    • Pixel 3a (mobile)        • 948AY0KK49                               • android-arm64  • Android 12 (API 31)
    • iPhone di Marco (mobile) • c14e8b9b123c6219308e3d8b3a25fa8741838244 • ios            • iOS 12.5.5 16H62

@nan-li nan-li changed the title Firt notification comes from the wrong side First notification comes from the wrong side (doesn't go to setNotificationWillShowInForegroundHandler) Nov 18, 2021
@amirr-dotcom
Copy link

if some have the solution please can you provide it to me same issue is happening with me.

@hugoyair
Copy link

I´m waiting for a solution, but I have been using it and It doesn´t go to the setNotificationWillShowInForegroundHandler, I thought It was only first time, but now sometimes It´s wrong.

@massimilianochiodi
Copy link
Author

I personally don't see where the problem is. only the first notification received when you install the app has this defect, all subsequent ones are handled correctly.
In my opinion this defect is negligible.

Obviously, when you do tests, maybe starting debug for app is always the first notification received, so it seems that behavior is always wrong.

@thebeliever18
Copy link

Same issue, notification is not being received by the setNotificationWillShowInForegroundHandler, only after setNotificationOpenedHandler is initialized, setNotificationWillShowInForegroundHandleris being triggered. Thank you

@thebeliever18
Copy link

thebeliever18 commented Dec 30, 2021

Steps to reproduce the problem:

  1. App opened, notification received on the mobile, but setNotificationWillShowInForegroundHandler not triggered.
  2. Again mobile received notification 2-3 times still setNotificationWillShowInForegroundHandler not triggered.
  3. Tapped the notification received, setNotificationOpenedHandler triggered.
  4. Again notification received in the mobile, and finally setNotificationWillShowInForegroundHandler triggered.

(Only after triggering setNotificationOpenedHandler, setNotificationWillShowInForegroundHandler is being triggered)
onesignal_flutter: ^3.2.7 <-Onesignal version

Device- realme
Modal-RMX2020
Android version-10

@thebeliever18
Copy link

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19041.1415], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2020.3)
[√] Connected device (4 available)

@Veloz-X
Copy link

Veloz-X commented Jan 7, 2022

Steps to reproduce the problem:

  1. App opened, notification received on the mobile, but setNotificationWillShowInForegroundHandler not triggered.
  2. Again mobile received notification 2-3 times still setNotificationWillShowInForegroundHandler not triggered.
  3. Tapped the notification received, setNotificationOpenedHandler triggered.
  4. Again notification received in the mobile, and finally setNotificationWillShowInForegroundHandler triggered.

(Only after triggering setNotificationOpenedHandler, setNotificationWillShowInForegroundHandler is being triggered)
onesignal_flutter: ^3.2.7 <-Onesignal version

Device- realme
Modal-RMX2020
Android version-10

In which version is it stable, in which version none of these problems occur ?
To be able to work normally.

@andynvt
Copy link

andynvt commented Jan 21, 2022

I have the same problem with setNotificationWillShowInForegroundHandler. It's called only after tapping the notification for Android and ios is not working at all. Any update?

@thebeliever18
Copy link

thebeliever18 commented Jan 21, 2022

Steps to reproduce the problem:

  1. App opened, notification received on the mobile, but setNotificationWillShowInForegroundHandler not triggered.
  2. Again mobile received notification 2-3 times still setNotificationWillShowInForegroundHandler not triggered.
  3. Tapped the notification received, setNotificationOpenedHandler triggered.
  4. Again notification received in the mobile, and finally setNotificationWillShowInForegroundHandler triggered.

(Only after triggering setNotificationOpenedHandler, setNotificationWillShowInForegroundHandler is being triggered)
onesignal_flutter: ^3.2.7 <-Onesignal version
Device- realme
Modal-RMX2020
Android version-10

In which version is it stable, in which version none of these problems occur ? To be able to work normally.

no idea, I think in does not work in any version, the problem/bug is in the code of @OneSignal package itself cause in other three different android devices same problem occurred.

@thebeliever18
Copy link

Developers any updates??

@elhe26
Copy link

elhe26 commented Jan 25, 2022

This is critical. Version 3.2.7 is not working.

@JIJO-cs
Copy link

JIJO-cs commented Jan 27, 2022

I have the same problem with setNotificationWillShowInForegroundHandler , any updates??

@SaBenBurra
Copy link

I have the same problem

@amirr-dotcom
Copy link

amirr-dotcom commented Jan 30, 2022 via email

@Marlen0307
Copy link

Marlen0307 commented Feb 12, 2022

Is there any updates related to this problem? I am facing the same problem with one signal flutter sdk. Did someone find a temporary workaround to this issue?

@Marlen0307
Copy link

Marlen0307 commented Feb 15, 2022

Everything seems to work now. For all of those who might need this, you should pull the one signal package from github repo. Thanks for the support

@massimilianochiodi
Copy link
Author

massimilianochiodi commented Feb 15, 2022 via email

@nan-li
Copy link
Contributor

nan-li commented Feb 15, 2022

Hi everyone, there is a fix for this in #534 but there has been no OneSignal-Flutter-SDK release yet.

If you are trying the GitHub repo directly to test, please let us know if the issue is not fixed for you.

@nmarko91
Copy link

@nan-li any idea when can we have this as an OneSignal-Flutter-SDK release? thanks

@Lawati97
Copy link

@nan-li i tried it and it worked with Huawei

@fede1295
Copy link

fede1295 commented Mar 1, 2022

@nan-li I also tried with the GitHub repo and the problem was solved! Thanks!

P.S. Small bug: the subtitle of the notification even if set is always null.

@RaashVision
Copy link

@nan-li Thanks ! Tried with github repo and it works! Below is what I did on the my app pubspec.yaml
image

@jkasten2
Copy link
Member

jkasten2 commented Mar 9, 2022

@nan-li I also tried with the GitHub repo and the problem was solved! Thanks!

P.S. Small bug: the subtitle of the notification even if set is always null.

@fede1295 Could you create a new issue for this one with a screenshot so we can address this separately?

@nan-li
Copy link
Contributor

nan-li commented Mar 10, 2022

This has been released in OneSignal-Flutter-SDK 3.3.0.

@alirezat66
Copy link

alirezat66 commented May 6, 2022

I think some developers surrounded together and said, guys what can we do to pester other developers and then create this plugin. Actually, after I see I can't change and set the sound of the notification I decided to play a sound when I got a notification manually, but guess what? Yes, we can't find when we get a notification when we are in the background. :D
is not beautiful? So we can't do anything we just can do nothing.

@jkasten2
Copy link
Member

jkasten2 commented May 7, 2022

@alirezat66 iOS is very limited in what you can do in the background, especially if you are trying to modify a notification before it display with app code. Apple only allow modifying a notification if you setup a Notification Service Extension target, this code can only be written in Swift or Objective-C.

For you custom sound use case you can configure it before you send notification with this guide:
https://documentation.onesignal.com/docs/customize-notification-sounds

@Cyph33r
Copy link

Cyph33r commented Aug 31, 2023

Same issue, notification is not being received by the setNotificationWillShowInForegroundHandler, only after setNotificationOpenedHandler is initialized, setNotificationWillShowInForegroundHandleris being triggered. Thank you

This worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.