Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

Sending a push notification to a specific user (BlueList-Auth)

2700078YSH gravatar image
Question by rjandino  (28) | Oct 21, 2014 at 10:53 AM pushmobiledataibmcloudbluelist

How can I send a push notification to a specific user in Bluemix? I've successfully built and run the iOS version of the bluelist-auth sample app. I would now like to see if I can modify the boilerplate to send a push notification to a specific "device user ID". The Bluemix documentation states that push can be used in the scenarios listed below. Sorry for posting such a basic question.

You can broadcast notifications:

  • To all registered mobile devices
  • To a subset of devices or device platforms
  • To device user IDs
  • To devices that are subscribed to specific tags

The code in the boilerplate reads: [self.cloudCodeService post:@"notifyOtherDevices" withDataPayload:nil withHeaders:nil]

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

2 answers

  • Sort: 
270006SWBD gravatar image
Accepted answer

Answer by Rama Boggarapu (2305) | Oct 21, 2014 at 04:44 PM

In addition to Venkat's response, here are couple of comments that should help to customize BlueList application you are referring to or your own application:

  1. When registering the device with Push service, you need to pass consumerId and deviceAlias. These two values are hard coded in BlueList application(MainActivity.java): public String deviceAlias = "TargetDevice"; public String consumerID = "MBaaSListApp";

You can parameterize them based on your needs and use the appropriate value for register call: push.register(deviceAlias, consumerID);

  1. notifyOtherDevices will send notification to all devices. You may also customize this function as well as to send notification to specific users. Instead of using sendBroadcastNotification, you should use sendNotificationByConsumerId as documented here: https://mobile.ng.bluemix.net/mbaas-api/docs/JavaScript/IBMPushService.html
Comment
RamaB

People who like this

  1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
120000DYT9 gravatar image

Answer by SVenkatakrishnan (411) | Oct 21, 2014 at 01:42 PM

Since you say that you have been successful with the iOS mobile app. on opening the app. it will register with the Push service

Log into the ACE webconsole of Bluemix and select the backend application you have configured in your iOS app. IN this backend app. you will notice Push, MAS and Data as services that are bound to it. Click on the Push tile and that will open up the Push console. The Notifications tab of the console has the options to select targets and send notifications to them. You could use this tab to identify your device by consumerId and then send notification to it. So the console approach is quick and easy.

Alternatively you could also use our ReST APIs to send messages or have any server side application that internally calls the ReST API or if your server side app is NodeJS then there is a easy to use NodeJS SDK for this.

Here is where our ReST APIs are documented https://mobile.ng.bluemix.net/mbaas-api/#!/push Here is where you can download the NodeJS SDK https://www.ng.bluemix.net/docs/#starters/mobile/index.html#index

Hope that helps, otherwise feel free to ask more questions.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

Follow this question

No one has followed this question yet.

Answers

Answers & comments

Related questions

Push notification not received in phone, but in blumix analytics it says it delivered. 4 Answers

Troubleshooting common issues when using the Push service in the BlueList sample application 2 Answers

Bluemix "Mobile Cloud" vs. "MobileFirst Starter Services" 1 Answer

403 when using the Push service in the BlueList sample application 2 Answers

"ibmbluemixcordovadata" tutorial, when run "bower install", there is error "No bower.json present" 9 Answers

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges