@totofe wrote:
Hi,
I try to send a push notification with ionic.io :
http://docs.ionic.io/docs/push-sending-push
I use this code :
var req = {
method: 'POST',
url: 'https://api.ionic.io/push/notifications',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + jwt
},
data: {
"tokens": tokens,
"profile": 'profile',
"notification": {
"title": titlePush,
"message": messagePush,
"android": {
"title": titlePush,
"message": messagePush,
"icon": "img/logo.png",
"data": {
"image": "img/logo.png"
}
},
"ios": {
"title": titlePush,
"message": messagePush
}
}
}
};// Make the API call $http(req).success(function (resp) { // Handle success console.log("Ionic Push: Push success", resp); }).error(function (error) { // Handle error console.log("Ionic Push: Push error", error); }); }
And I receive this notification:
So, how I do to send my logo in notification?
Posts: 5
Participants: 2