SlideShare a Scribd company logo
Push Notification - Part I
Push is one of the more challenging tasks on mobile, the first time around it’s an uphill battle because it’s just so darn confusing and alien. However, once you understand
the underlying logic and platform oddities it becomes simple.
We’ll start with GCM by going to https://developers.google.com/mobile/add where we need to be logged in with our google account. Here start by clicking pick a
platform for which we select Android. While GCM has some support for iOS it is not native support and we use the native iOS push servers directly instead.
Now we need to paste the package of the application so Android can properly identify the right caller. You are prompted to create the package if the app doesn’t exist
yet. Notice the term app in this case refers to the server side logical application in googles cloud not to the client side Android native application…

After we finish this we can press choose and configure services this opens a prompt after a “short” wait…
We can either share or not share service data that’s up to you and we can the proceed to the final stage of creation of the app which also entails some waiting
In the final stage we can activate cloud messaging this provides us with two important keys one a long string and the other numeric…
You need to keep both values for later as we will need them to send and receive push but first we need the value from the sender ID
We need to launch the Codename One Settings application and go to build hint.
Here we can add the gcm.sender_id build hint and place in the sender id that we got from Google. Once we do that the Android portion of registration is done, we’ll still
need some of these values in the code but we finished the configuration portion for Android
In the iOS side we need to run the certificate wizard because push needs special certificates of its own. But first you need to make sure you are logged in with a pro
account or higher within the preferences UI, otherwise you won’t be prompted for push details
Once we login to the Apple developer account we can move to the next step
We pick or add devices, I tinted the device list a bit for privacy and then we move to the next stage
This is a very important and confusing concept in the certificate wizard… If you don’t have a certificate or it’s the first time around you won’t see this dialog but if you
already have a certificate and it’s working for you should normally answer NO!

That’s important as revoking the certificate would mean it would stop working for your other apps and if you have more than one Codename One app on the same
account it’s probably not what you want. 

If you already have a P12 certificate for iOS you need to reference it from this project. A provisioning profile will be generated with reference to the existing certificate so
it’s important to get all of these pieces right.
This is a very important and confusing concept in the certificate wizard… If you don’t have a certificate or it’s the first time around you won’t see this dialog but if you
already have a certificate and it’s working for you should normally answer NO!

That’s important as revoking the certificate would mean it would stop working for your other apps and if you have more than one Codename One app on the same
account it’s probably not what you want. 

If you already have a P12 certificate for iOS you need to reference it from this project. A provisioning profile will be generated with reference to the existing certificate so
it’s important to get all of these pieces right.
Assuming this is the case you will probably get prompted again for the debug certificate as iOS has two certificates for debug and production. Everything we said about
the production certificate beforehand applies here in exactly the same way.
We now get this form, naturally I chose not to generate the certificates so it says so on top but the important piece here is the enable push checkbox that we must
activate. If this checkbox isn’t here then you aren’t logged in with a pro account!

Once we finish and press save the certificates should be generated, we should also receive an email with instructions and URLs explaining how we should integrate
push.

The email should contain URL’s in the cloud for 2 push certificates which are also generated to your local filesystem under iOS certs. These URL’s are important when we
need to send the push message.

More Related Content

PDF
Push Notification - Part 3 - Transcript.pdf
PDF
How do I - Use Push Notification.pdf
PPTX
push_notification
PDF
Push to Me: Mobile Push Notifications (Zend Framework)
KEY
How to build a server and a iPhone client application using the Apple Push No...
PDF
PDF
Petr Dvořák: Push notifikace ve velkém
DOCX
Configure & send push notification on i os device
Push Notification - Part 3 - Transcript.pdf
How do I - Use Push Notification.pdf
push_notification
Push to Me: Mobile Push Notifications (Zend Framework)
How to build a server and a iPhone client application using the Apple Push No...
Petr Dvořák: Push notifikace ve velkém
Configure & send push notification on i os device

Similar to Push Notification - Part 1 - Transcript.pdf (20)

PPTX
Apple notification push
PDF
Testing Push Notification : Test Push Notification in iOS Simulator & Android...
PDF
Mobile Push Notifications
PDF
Leveraging Zend Framework for Sending Push Notifications
PDF
REST is not enough: Using Push Notifications to better support your mobile cl...
PDF
Zend Framework Push Notifications
PPT
Desarrollo AIR Mobile
PDF
In the hunt of 100% delivery rate with mobile push notifications
PDF
Creating a Facebook Clone - Part XLV - Transcript.pdf
PPTX
iOS Distribution and App store pushing and more
PDF
Lime - Push notifications. The big way.
PPTX
Push Notification for Android, iOS & Sever Side Using Firebase Cloud Messaging
PDF
A Journey into Google Cloud Messaging
PPTX
How push notifications works?
ODP
Push notifications presentation
PDF
Push-Notification
PPTX
Implementation of Push Notification in React Native Android app using Firebas...
PDF
Get step-by-step instructions on implementing notifications in your apps.
PDF
Google cloud messaging
PPTX
How to build ios app
Apple notification push
Testing Push Notification : Test Push Notification in iOS Simulator & Android...
Mobile Push Notifications
Leveraging Zend Framework for Sending Push Notifications
REST is not enough: Using Push Notifications to better support your mobile cl...
Zend Framework Push Notifications
Desarrollo AIR Mobile
In the hunt of 100% delivery rate with mobile push notifications
Creating a Facebook Clone - Part XLV - Transcript.pdf
iOS Distribution and App store pushing and more
Lime - Push notifications. The big way.
Push Notification for Android, iOS & Sever Side Using Firebase Cloud Messaging
A Journey into Google Cloud Messaging
How push notifications works?
Push notifications presentation
Push-Notification
Implementation of Push Notification in React Native Android app using Firebas...
Get step-by-step instructions on implementing notifications in your apps.
Google cloud messaging
How to build ios app
Ad

More from ShaiAlmog1 (20)

PDF
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
PDF
create-netflix-clone-06-client-ui.pdf
PDF
create-netflix-clone-01-introduction_transcript.pdf
PDF
create-netflix-clone-02-server_transcript.pdf
PDF
create-netflix-clone-04-server-continued_transcript.pdf
PDF
create-netflix-clone-01-introduction.pdf
PDF
create-netflix-clone-06-client-ui_transcript.pdf
PDF
create-netflix-clone-03-server.pdf
PDF
create-netflix-clone-04-server-continued.pdf
PDF
create-netflix-clone-05-client-model_transcript.pdf
PDF
create-netflix-clone-03-server_transcript.pdf
PDF
create-netflix-clone-02-server.pdf
PDF
create-netflix-clone-05-client-model.pdf
PDF
Creating a Whatsapp Clone - Part II.pdf
PDF
Creating a Whatsapp Clone - Part IX - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part II - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part V - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part IV - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part IV.pdf
PDF
Creating a Whatsapp Clone - Part I - Transcript.pdf
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-01-introduction.pdf
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-03-server.pdf
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-02-server.pdf
create-netflix-clone-05-client-model.pdf
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
1. Introduction to Computer Programming.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
Teaching material agriculture food technology
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
A Presentation on Artificial Intelligence
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Empathic Computing: Creating Shared Understanding
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Digital-Transformation-Roadmap-for-Companies.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
1. Introduction to Computer Programming.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Teaching material agriculture food technology
NewMind AI Weekly Chronicles - August'25-Week II
MIND Revenue Release Quarter 2 2025 Press Release
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Tartificialntelligence_presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A Presentation on Artificial Intelligence
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
Empathic Computing: Creating Shared Understanding
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

Push Notification - Part 1 - Transcript.pdf

  • 1. Push Notification - Part I Push is one of the more challenging tasks on mobile, the first time around it’s an uphill battle because it’s just so darn confusing and alien. However, once you understand the underlying logic and platform oddities it becomes simple.
  • 2. We’ll start with GCM by going to https://developers.google.com/mobile/add where we need to be logged in with our google account. Here start by clicking pick a platform for which we select Android. While GCM has some support for iOS it is not native support and we use the native iOS push servers directly instead.
  • 3. Now we need to paste the package of the application so Android can properly identify the right caller. You are prompted to create the package if the app doesn’t exist yet. Notice the term app in this case refers to the server side logical application in googles cloud not to the client side Android native application… After we finish this we can press choose and configure services this opens a prompt after a “short” wait…
  • 4. We can either share or not share service data that’s up to you and we can the proceed to the final stage of creation of the app which also entails some waiting
  • 5. In the final stage we can activate cloud messaging this provides us with two important keys one a long string and the other numeric…
  • 6. You need to keep both values for later as we will need them to send and receive push but first we need the value from the sender ID
  • 7. We need to launch the Codename One Settings application and go to build hint.
  • 8. Here we can add the gcm.sender_id build hint and place in the sender id that we got from Google. Once we do that the Android portion of registration is done, we’ll still need some of these values in the code but we finished the configuration portion for Android
  • 9. In the iOS side we need to run the certificate wizard because push needs special certificates of its own. But first you need to make sure you are logged in with a pro account or higher within the preferences UI, otherwise you won’t be prompted for push details
  • 10. Once we login to the Apple developer account we can move to the next step
  • 11. We pick or add devices, I tinted the device list a bit for privacy and then we move to the next stage
  • 12. This is a very important and confusing concept in the certificate wizard… If you don’t have a certificate or it’s the first time around you won’t see this dialog but if you already have a certificate and it’s working for you should normally answer NO! That’s important as revoking the certificate would mean it would stop working for your other apps and if you have more than one Codename One app on the same account it’s probably not what you want. If you already have a P12 certificate for iOS you need to reference it from this project. A provisioning profile will be generated with reference to the existing certificate so it’s important to get all of these pieces right.
  • 13. This is a very important and confusing concept in the certificate wizard… If you don’t have a certificate or it’s the first time around you won’t see this dialog but if you already have a certificate and it’s working for you should normally answer NO! That’s important as revoking the certificate would mean it would stop working for your other apps and if you have more than one Codename One app on the same account it’s probably not what you want. If you already have a P12 certificate for iOS you need to reference it from this project. A provisioning profile will be generated with reference to the existing certificate so it’s important to get all of these pieces right.
  • 14. Assuming this is the case you will probably get prompted again for the debug certificate as iOS has two certificates for debug and production. Everything we said about the production certificate beforehand applies here in exactly the same way.
  • 15. We now get this form, naturally I chose not to generate the certificates so it says so on top but the important piece here is the enable push checkbox that we must activate. If this checkbox isn’t here then you aren’t logged in with a pro account! Once we finish and press save the certificates should be generated, we should also receive an email with instructions and URLs explaining how we should integrate push. The email should contain URL’s in the cloud for 2 push certificates which are also generated to your local filesystem under iOS certs. These URL’s are important when we need to send the push message.