androidvisual-studioandroid-emulatormaui

Receiving Push Notifications on Android Emulator for .NET MAUI app


I have a .NET MAUI app and have configured it to receive push notifications through Azure Notification Hubs.

My research tells me I should be able to receive push notifications on Android Emulator but I'm not receiving them, even though sending them through Azure Portal -- for Notification Hubs -- shows success.

First, I want to make sure it is possible to receive push notifications on Android Emulator.

Second, is there anything special I need to do in configuring Android Emulator?

P.S. My .NET MAUI app targets .NET 8 and I have added the following in AndroidManifest.xml: <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />


Solution

  • You can receive them on an emulator but it will need to have the Google Play Store installed, not all of that have that. Not just Google Play Services.

    On iOS receiving push notifications on the Simulator is not possible.

    Sept. 2024 Update: as of Xcode 11.4 you can now test remote push notifications on the iOS Simulator as documented by Apple here.