<commit_before>:toclevels: 4

:include-tags:

include::_partials/attributes.adoc[tags={include-tags}]


:toc:

// For more information, see: https://redhat-documentation.github.io/modular-docs/

:context: push
ifdef::context[:parent-context: {context}]

[id='a-collection-of-modules']
= Using the {unifiedpush-service} Mobile Service
:page-partial:

[[introduction]]
The {unifiedpush-service} service allows you to send native push notifications to different mobile operating systems.

* Code once and push notifications to iOS and Android.
* Push notifications to defined groups.
* Push notifications to either iOS only or Android only.
* Push notifications to different variants of a mobile app.
* Push notifications from different back-end apps to the same mobile app.


Currently the service supports:

* link:https://developer.apple.com/notifications/[Apple Push Notification Service^]
* link:https://firebase.google.com/products/cloud-messaging/[Firebase Cloud Messaging^]

The {unifiedpush-service} service offers a unified Notification Service API to the above mentioned Push Network Services.
It can be seen as a _broker_ that distributes push messages to different 3rd party Push Networks.

[NOTE]
====
* The payload of the push notification is delivered to 3rd party Push Network providers, Google or Apple. {org-name} recommends that users do not send any sensitive personal or confidential information (for example, a social security number, financial account or transactional information) as part of any Push Notification. Users of push notifications should not have an expectation of secure transmission.

* For analytic purposes, the service stores the content of the +alert+ key sent to the UnifiedPush Server.
The content of the +alert+ key belongs to the metadata, which is deleted after 30 days, using a nightly job within the UnifiedPush Server.

* You are only able to send push notifications to a real device, sending push notifications to an emulator fails.

* Push is a signaling mechanism and is not suitable to be used as a data carrying system, for example, a chat application.
====

.Prerequisites

* You understand {unifiedpush-service}.
* You have logged into the OpenShift console and the Mobile Developer Console.

.Additional resources

* link:https://developer.apple.com/notifications/[Apple Push Notification Service^]
* link:https://firebase.google.com/products/cloud-messaging/[Firebase Cloud Messaging^]

include::_partials/ref_terminology.adoc[leveloffset=+1,tags={include-tags}]
[[setting-up-the-push-service]]
== Setting Up the {unifiedpush-service} Mobile Service
include::_partials/obtaining_firebase_cloud_messaging_credentials.adoc[leveloffset=+2,tags={include-tags}]
include::_partials/enable_push_notifications_for_ios_app.adoc[leveloffset=+2,tags={include-tags}]
[[setting-up-the-push-client-app]]

== Configuring the Push Notification Service

Access the Push Notification Service section by clicking *Push Notification Service* under the *All Services* tab from the {webapp}.

* If some applications already exist, they will be displayed so click "Create Application" to go to the Welcome page.  If there are no previous applications, you will be taken directly to the Welcome page.
* Click *Start Here* to dismiss the Welcome Page and go to the *Create Application* screen
* Enter a name for your application and click *Create App* to go to the Variant screen
* Click *Add a Variant*
* Enter a name for your variant and select the platform that you intend to target
* Enter the Push Network details necessary for your push network and click *Create*
* Copy each of the various code snippets into its corresponding file in your application 
* Build and deploy your app
* Click the *Skip the wizard* link to finish.<commit_msg>Changes bullet points list to numbered list<commit_after>:toclevels: 4

:include-tags:

include::_partials/attributes.adoc[tags={include-tags}]


:toc:

// For more information, see: https://redhat-documentation.github.io/modular-docs/

:context: push
ifdef::context[:parent-context: {context}]

[id='a-collection-of-modules']
= Using the {unifiedpush-service} Mobile Service
:page-partial:

[[introduction]]
The {unifiedpush-service} service allows you to send native push notifications to different mobile operating systems.

* Code once and push notifications to iOS and Android.
* Push notifications to defined groups.
* Push notifications to either iOS only or Android only.
* Push notifications to different variants of a mobile app.
* Push notifications from different back-end apps to the same mobile app.


Currently the service supports:

* link:https://developer.apple.com/notifications/[Apple Push Notification Service^]
* link:https://firebase.google.com/products/cloud-messaging/[Firebase Cloud Messaging^]

The {unifiedpush-service} service offers a unified Notification Service API to the above mentioned Push Network Services.
It can be seen as a _broker_ that distributes push messages to different 3rd party Push Networks.

[NOTE]
====
* The payload of the push notification is delivered to 3rd party Push Network providers, Google or Apple. {org-name} recommends that users do not send any sensitive personal or confidential information (for example, a social security number, financial account or transactional information) as part of any Push Notification. Users of push notifications should not have an expectation of secure transmission.

* For analytic purposes, the service stores the content of the +alert+ key sent to the UnifiedPush Server.
The content of the +alert+ key belongs to the metadata, which is deleted after 30 days, using a nightly job within the UnifiedPush Server.

* You are only able to send push notifications to a real device, sending push notifications to an emulator fails.

* Push is a signaling mechanism and is not suitable to be used as a data carrying system, for example, a chat application.
====

.Prerequisites

* You understand {unifiedpush-service}.
* You have logged into the OpenShift console and the Mobile Developer Console.

.Additional resources

* link:https://developer.apple.com/notifications/[Apple Push Notification Service^]
* link:https://firebase.google.com/products/cloud-messaging/[Firebase Cloud Messaging^]

include::_partials/ref_terminology.adoc[leveloffset=+1,tags={include-tags}]
[[setting-up-the-push-service]]
== Setting Up the {unifiedpush-service} Mobile Service
include::_partials/obtaining_firebase_cloud_messaging_credentials.adoc[leveloffset=+2,tags={include-tags}]
include::_partials/enable_push_notifications_for_ios_app.adoc[leveloffset=+2,tags={include-tags}]
[[setting-up-the-push-client-app]]

== Configuring the Push Notification Service

Access the Push Notification Service section by clicking *Push Notification Service* under the *All Services* tab from the {webapp}.

. If some applications already exist, they will be displayed so click "Create Application" to go to the Welcome page.  If there are no previous applications, you will be taken directly to the Welcome page.
. Click *Start Here* to dismiss the Welcome Page and go to the *Create Application* screen
. Enter a name for your application and click *Create App* to go to the Variant screen
. Click *Add a Variant*
. Enter a name for your variant and select the platform that you intend to target
. Enter the Push Network details necessary for your push network and click *Create*
. Copy each of the various code snippets into its corresponding file in your application 
. Build and deploy your app
. Click the *Skip the wizard* link to finish.
{'fraction_non_alphanumeric': 0.07436708860759493, 'fraction_numerical': 0.002109704641350211, 'mean_word_length': 5.227422003284072, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6532224', 'n_tokens_mistral': 2011, 'n_tokens_neox': 1875, 'n_words': 905}