Community

Community Forums

Where our customers, developers, and more can come together to help each other with both general and technical questions about our products and services.

Notification are not sent to devices from urban airship

Ahsan Naseem

I am sending notification from server (PHP) using sdk to named user with some extra data. but the notification type shown on urban console as Silent notification. and payload also empty. Things are working fine before. but don't know what happened now.

When i set audience P\all. then it's message type is fine. in case of named user it's type become Silent Message. which is wrong. can you tell me what is wrong in my code. 

Code:

$airship = new Airship('APP_UA_APP_KEY', 'APP_UA_MASTER');

$response = $airship->push()
->setAudience(P\namedUser("name_user_id"))
->setNotification(P\notification($message,
['android' =>
['extra' =>
['extra_info' => json_encode($object)],
],
'ios' =>
['extra' =>
['extra_info' => json_encode($object)],
],
]))
->setDeviceTypes(['ios', 'android'])
->send();

Please sign in to leave a comment.

0
Avatar

Hi Ahsan,

Thank you for writing in to the Urban Airship Support Forum.

Messages sent to Named Users are considered to be unicast messages, meaning that they are sent to individual users. Such information about the specific devices and the content of these messages could potentially be considered personally identifiable information and has been removed from the Urban Airship Dashboard. This was a recent change as of April 16th.

Please let me know if there are any additional details I can provide.

Jenn Miller 0 votes
Comment actions Permalink
0
Avatar

Thank Miller for your reply.

So can you guide us how can we send notification to a targeted users without naming them?

 

Ahsan Naseem 0 votes
Comment actions Permalink
0
Avatar

Hi Ahsan,

Our PHP library documentation walks you through all the audience options for push notifications.

Please keep in mind that we do not store any payload/device information for any unicast messages. Therefore, if you send a notification to a channel ID (or another unicast audience option), you will also find that there is no associated payload/device information in the Dashboard. 

Jenn Miller 0 votes
Comment actions Permalink