title: How do I get 'onMessageReceived' to trigger on Notification (HMS Push Kit) in React Native?
body: <p>I'm trying to read the payload of my notifications, but the event won't trigger. It works fine for Data messages, but doesn't seem to notice notifications.</p>
  <p>AndroidManifest:</p>
  <pre><code>        &lt;service
              android:name=&quot;com.huawei.hms.push.react.RNHmsMessageService&quot;
              android:exported=&quot;true&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;com.huawei.push.action.MESSAGING_EVENT&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/service&gt;
          &lt;receiver android:name=&quot;com.huawei.hms.push.react.RNReceiver&quot;/&gt;
          &lt;meta-data
              android:name=&quot;push_kit_auto_init_enabled&quot;
              android:value=&quot;true&quot; /&gt;
  </code></pre>
  <p>RNHmsMessageService</p>
  <pre><code>public void onMessageReceived(RemoteMessage message) {
          Log.i(TAG, &quot;onMessageReceived is called&quot;);
          if (message == null) {
              Log.e(TAG, &quot;Received message entity is null!&quot;);
              return;
          }
  
          Log.i(TAG, &quot;getCollapseKey: &quot; + message.getCollapseKey()...
  
          RemoteMessage.Notification notification = message.getNotification();
          if (notification != null) {
              Log.i(TAG, &quot;\n getImageUrl: &quot; + notification.getImageUrl()...
          }
  
          Boolean judgeWhetherIn10s = false;
          // If the messages are not processed in 10 seconds, the app needs to use WorkManager for processing.
          if (judgeWhetherIn10s) {
              startWorkManagerJob(message);
          } else {
              // Process message within 10s
              processWithin10s(message);
          }
      }
  </code></pre>
  <p>build.gradle</p>
  <pre><code>implementation 'com.huawei.hms:push:4.0.4.301'
  </code></pre>
  <p>I think that message.getNotification() is always null, thus not triggering.</p>