App Center Push not work

jancijanci Member ✭✭

Hi I configured Push follow instruction in https://docs.microsoft.com/en-us/appcenter/sdk/push/xamarin-forms.

App.xaml.cs

    protected override void OnStart()
    {
        AppCenter.Start("KEY", typeof(Push));
    }

In ViewModel class I check if Push is enabled with method IsEnabledAsync

    bool isEnabled = await Push.IsEnabledAsync();

Returns false.

IsEnabledAsync returns false also before is called SetEnabledAsync(true)

            await Push.SetEnabledAsync(true);
            bool isEnabled = await Push.IsEnabledAsync();

            Debug.WriteLine($"Push Is Enabled: {isEnabled}"); // still false

When I sent Push notification via App Center it’s never show.

Tested on Genymotion Emulator Android 8 also on phone with Android 6.

What can be wrong?

Thank you

Answers

Sign In or Register to comment.