locked
Xamarin, push уведомления RRS feed

  • Общие обсуждения

  • Всем привет. Разрабатываю приложения Xamain, пока именно Android. Дали точное указание посылать пуш уведомления на устройство тогда, после закрытия устройства.

    Пользуюсь инструкцией: https://docs.microsoft.com/en-us/xamarin/android/data-cloud/google-messaging/remote-notifications-with-fcm?tabs=vswin

    Использую FCM. При включенном приложении все отлично, но когда я его закрываю сообщения не приходят. Помогите, уже очень долго пытаюсь сделать. В инструкции написано: 

    If you force-close the app, FCM will stop delivering notifications. Android prevents background service broadcasts from inadvertently or unnecessarily launching components of stopped applications. (For more information about this behavior, see Launch controls on stopped applications.) For this reason, it is necessary to manually uninstall the app each time you run it and stop it from a debug session – this forces FCM to generate a new token so that messages will continue to be received.

    Но другие делают такие уведомления, я сам видел примеры, на сколько я понимаю с помощью BroadcastReceiver.

    Но не уверен. Помогите! 

    13 апреля 2018 г. 10:45

Все ответы

  • В инструкции для GSM - написано: Note that GCM messages will no longer be received if the app is force-stopped. To resume notifications after a force-stop, the app must be manully restarted. For more information about this Android policy, see Launch controls on stopped applications and this stack overflow post.

    https://docs.microsoft.com/en-us/xamarin/android/data-cloud/google-messaging/remote-notifications-with-gcm

    13 апреля 2018 г. 10:57
  • Но другие делают такие уведомления, я сам видел примеры

    Но делают же как то, как мне сделать так же?

    Тупо закрытое приложение тебе шлет пуш уведомление. Разве у вас на телефоне небыло такого?

    17 апреля 2018 г. 7:53