Using App42 Push Notification – Backend as a Service

ShepHertz App42 platform is now equipped with Push notification APIs and is supported on following platforms.

  • Android devices using GCM (Google Cloud Messaging)
  • iOS devices using APNS (Apple Push Notification Service)
  • Toast messages on WP7 (Windows Phone 7) using MPNS (Microsoft Push Notification Service)

App42 Push Notification API can be used to send direct push messages to devices running on above stated platforms. It can also be used to send messages in Channel Subscription Model. It provides the API to create channel, subscribe to channel and unsubscribe to channel. Once channel is created and subscribed by users, it can be used for sending the message over the channel.

App42 Push Notification API is easy to use and integrate and requires absolutely no back-end. Here are the steps to use it in target platforms:

Android

  • 1. Upload your Server API Keys obtained from Google to App42 platform using AppHQ console as shown in following screenshot

AndroidAPI2 300x147 Using App42 Push Notification   Backend as a Service

  • 2. You can also upload the Server API key using Push Notification API call uploadApiKey(String apiKey)
  • 3. If you don’t know how to get Server API key from Google please see the GCM Developer Guide
  • 4. In your app call the storeDeviceToken(String Username,String deviceToken) method by passing userName and device registration id (Device Token) obtained from GCM service. This call should be made only during the installation of the app.
  • 5. Once user name and his device id is registered with App42, you are ready to send the message to target user/device using API call sendPushMessageToUser(String username,String message)
  • 6. You can also send custom key value type message using API call sendPushMessageToUser(String username,HashMap< String,String> keyValueMessage)
  • 7. Direct message can also be send using AppHQ Console by selecting target user from the registered user list in Push Notification tab shown in below screen shot.
  • PushToUserAndroid 300x142 Using App42 Push Notification   Backend as a Service 8. You can also create channel using AppHQ console or using direct API for creating the channel createChannelForApp(String channel,String description)
  • 9. User needs to subscribe to channel for receiving Push messages for channels. User subscription can be done using API subscribeToChannel(String channel,String userName)
  • 10. Messages can be send for a particular channel using API call sendPushMessageToChannel(String channel,String message)
  • 11. This can also be achieved using AppHQ console in Push Notification after selecting the Channel section inside it.
  • 12. You can also send message to all your app users using API call sendPushMessageToAll(String message), This API call will deliver the message to all your app users irrespective to their target platform device. For example calling this method from Android device will deliver message to all your app users having devices in either Android/ or OS or WP7.

iOS

  • 1. Upload the .p12 file received from APNS to App42 platform using either AppHQ console or using API call uploadFile(NSString*)password filePath:(NSString*)filePath environment:(NSString*)environment
  • 2. Environment value could be either development or production.
  • 3. You can also upload .p12 file using AppHQ console as shown below

p12iOS 300x144 Using App42 Push Notification   Backend as a Service

  • 4. In your app call the storeDeviceToken:(NSString *)userName:(NSString *)deviceToken method by passing the user name and device registration id received from APNS.
  • 5. Once user device is registered, Push notification can be send to his device by calling the API sendPushMessageToUser:(NSString *)userName message:(NSString *)message
  • 6. You can also send the message to user using AppHQ console as explained above in Android section.
  • 7. Message can also be send using key value format in dictionary by calling sendPushMessageToUser:(NSString *)userName message:(NSString *)message
  • 8. Channel APIs can be used for creating channel, subscription to channel and sending message to it. Please see the Android section above for detail explanation.
  • 9. You can also send message to all your app user using API sendPushMessageToAll:(NSString *)message. This API call will deliver the message to all your app users irrespective to their target platform device. For example calling this method from iOS device will deliver message to all your app users having devices in either Android or OS or WP7.

WP7

  • 1. On WP7, you can start with calling the API StoreDeviceToken(String username,String deviceToken,App42Callback requestCallback) where deviceToken refers to notification URI received from APNS after registering app for receiving Push messages.
  • 2. Once user device is registered with above API call, you can use the API SendPushToastMessageToUser(String userName, String title, String subTitle, String param, App42Callback requestCallback) to send the toast message to windows devices.
  • 3. You can also send message to your app users using AppHQ console as explained in Android section above.
  • 4. Channel APIs can be used for creating channel, subscription to channel and sending message to it. Please see the Android section above for detail explanation.
  • 5. You can also send message to all your app user using API SendPushMessageToAll(String message, App42Callback requestCallback) message. This API call will deliver the message to all your app users irrespective to their target platform device. For example calling this method from WP7 device will deliver message to all your app users having devices in either Android or OS or WP7.
more on pricing Using App42 Push Notification   Backend as a Serviceget started Using App42 Push Notification   Backend as a Service
twitter Using App42 Push Notification   Backend as a Servicefacebook Using App42 Push Notification   Backend as a Servicegoogle Using App42 Push Notification   Backend as a Servicelinkedin Using App42 Push Notification   Backend as a Servicepinterest Using App42 Push Notification   Backend as a Servicereddit Using App42 Push Notification   Backend as a Servicestumbleupon Using App42 Push Notification   Backend as a Servicetumblr Using App42 Push Notification   Backend as a Service

Leave a Reply

Your email address will not be published. Required fields are marked *


six − 3 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>