Parse Push has stopped - php

from the dashboard -> push, when we click "+ send a push", it displays the number of recipients > 0. when we select send to everyone, device type ios clients (all of our recipients are on ios) and send a message and when we go back to:
/push_notifications
the latest entries show 0 subscribes
There were no error messages displayed while sending. Just to reiterate, we selected send to everyone, not particular channel. No one received the push.
The older entries still show > 0 subscribers, the last few show 0.
Any idea what might be happening?
Thanks.

Check the format of your Json, quite often with Parse.com when you send json push notification that isn't in the correct format it will fail silently. Also Double check your certificates in parse.com. Ensure you have a .p12 with no password in the push notifications settings

Related

Plivo SMS debugging - Get all logs for specific message

I am trying to figure out how to be able to show the user a list of delivery logs related to the specific message they sent out. Right now I can't seem to find a way of grouping the logs, short of basing it off of a date and time and maybe anything within 5 minutes of the time it was sent. This is because it assigns a different message and request ID to each number that message was sent to. But is there a better way?
Go to Plivo > SMS > Logs
Download logs
Open with Notepad++
???
Filter as you please.
Otherwise, check API documentation.
The Plivo webapp offers these filters: "From/To/Direction/Status/Error/Timeframe" as per: snag.gy/P6sRNH.jpg
Also, if you mean to display to the user programatically through REST API, I think you should make an app with the following flow:
auth api
fetch all logs (maybe pass a value of last time they sent messages + 14 days... if that is saved somewhere) > URI: /v1/Account/YOURACCOUNTMX3$cD../Message/
Search by Params : { text : Your Text Here

Gmail API Missing Messages

I am having trouble retrieving all messages through the Gmail API PHP Library. I use listUsersThreads to retrieve all threads to do either a full or partial mailbox sync on a user's account. The initial full sync processes and returns the message ids I need, which I then use to store mail meta headers (from, to, date, subject). A subsequent call using listUserHistory from the last history id, allows me to do a partial sync to only retrieve the latest messages. From the data I have stored, I then display a full message conversation log between two parties, ordered by date to show the conversation. Clicking the message will then query the API to retrieve email body, which I then display.
The issue is that based on the messages I have saved, looking at the MIME content, there are messages in the MIME body, that I do not have on my database. I then also tried to query the API using a search query, and still there are missing messages, not returned by the API.
A previous developer used mimecast to get the messages, and querying that database does in fact return the messages that I'm missing.
How is the Google Gmail API not giving me all messages between sender and receiver? The MIME body clearly shows messages that are not available when querying the API, and I don't understand why, or how to find the missing messages.
Any assistance would be appreciated.
So, for in case this issue comes up for anyone else, I believe that it has something to do with expired history items. I stand to be corrected, as this can only be proved after I've had my implementation running for more than two weeks.
If you're considering running a mailbox sync, there's a good chance that you'll be missing messages, especially if those messages were sent from a client other than Inbox or Gmail. History items are kept for two weeks on average, so by syncing a mailbox, you'll be syncing everything from when the account was activated, but expired history items will not be available.
In theory, this means that you should have the full email conversation while a partial sync is executed. You should have all the MIME headers that you need as and when the communication takes place, provided that, like me, you have push notifications enabled through the Google Cloud Services console to alert your systems to run a partial sync process on any given account.
If your partial sync is executed manually, or possibly through CRON on an interval, rather than through push notifications, you'll need to make sure that the interval is configured to sync while all history items are still available and accessible.
The downside of this, though, is that even if you do have trace of all communication with their message IDs, a lookup on an expired message to retrieve email body will fail with a 404 status code, and you will not be able to retrieve email body contents for some messages.
Thus, if your processes relies heavily on what's in the body of the email, you should also store body content locally during a partial sync I really only need the MIME headers, although I do lookup message contents when needed, but it won't cause major problems for me if I was unable to retrieve the body of any given message.
I should be able to confirm this theory within a month from now, so if you think my theory is incorrect, please feel free to make me the wiser. :)

How to display each push notification separately on android device using GCM

I am sending push notification to my phonegap app from server. Its getting delivered successfully, but the problem is if I send multiple notifications old one get overrides.
For example
at 10:00 AM -
Notification 1 Received
at 10:01 AM
Notification 2 Received
in this Notification 1 Received get overwrite by second message. But I want to show both messages as they important.
I googled it and found solution on stackoverflow for same.
GCM message is getting overridden?
but its for android, and I am using phonegap and php to send notification,
is there any way to assign that we can retain both messages on user screen.
Thanks in advance.
Your issue is with the payload data you are sending with PHP.
From the documentation at https://developers.google.com/cloud-messaging/http-server-ref#notification-payload-support
tag: Indicates whether each notification message results in a new entry on the notification center on Android. If not set, each request creates a new notification. If set, and a notification with the same tag is already being shown, the new notification replaces the existing one in notification center.
One option is to treat tag as a uniqid, as long as you do not really need to go back and update some unread notifications. If you do need to update a notification, choose an id that works in your case.

Apple push notification questions

I don't really know how to ask these but hopefully I can make myself clear enough for you to understand my questions
The message limit is 256. But which is the message I need to impose this limit on?
At first I thought it was referring to json size. But after looking through the code zend use, and others who use push notification, additional information is sent through payload (the json is 256 but the payload sent is 270). Should I limit the json to 240 or less?
What happens if more than one message has the same Id (I'm not talking about device id)
How fast can I send a second message to the same device? I have some problems that only one message arrives.
I use timestamp for Id, so I was wondering if this is the cause of my problem or maybe I can't send 5 messages in the same seccond to a single device.
From Apple Developer site:
The Notification Payload
Each push notification includes a payload. The payload contains
information about how the system should alert the user as well as any
custom data you provide. The maximum size allowed for a notification
payload is 256 bytes; Apple Push Notification Service refuses any
notification that exceeds this limit.
The limit is on complete payload which mean JSON + Your Message. So your message should be limited to 236 characters and then add the character count of following JSON: {"aps":{"alert":""}}.
how fast can i send a second message to the same device? I have some problems that only 1 message arrives.
There is no restriction on sending messages to one device. However, Apple does not guarantee delivery of all of your messages and APNS may deliver only the latest push notification message of the device in case multiple messages have been received from one app which are destined on the same device.
From iOS Developer Library:
Some Notifications Received, but Not All
If you are sending multiple notifications to the same device or computer within a short
period of time, the push service will send only the last one.
Here's why. The device or computer acknowledges receipt of each
notification. Until the push service receives that acknowledgment, it
can only assume that the device or computer has gone off-line for some
reason and stores the notification in the quality of service (QoS)
queue for future redelivery. The round-trip network latency here is of
course a major factor.
As described in the Local and Push Notification Programming Guide, the
QoS queue holds a single notification per app per device or computer.
If the service receives another notification before the one in the
queue is sent, the new notification overwrites the previous one.
Thanks to Joachim Isaksson for providing the above link.
Well, the 256 bytes limit is on the binary representation of the JSON payload (the device token as well as the other headers are not included in this count). That means you can send a 256 character JSON string if you only use characters which require a single byte in UTF-8 encoding. If you send text in languages whose characters require more than one byte, you will have room for less characters in your payload. I tested it, and that's how it behaves.
As for sending more than one message with the same id, that would defeat the purpose of the message id. When Apple encounter some error in your message (such as invalid device token), it sends back an error response containing the message id you supplied. If you send multiple messages with the same id, you won't be able to know which message causes the error response.

iphone dev showing date and time in Push notification

I have implemented ray wenderlich's tutorials on Apple push notification, now i want to display the date and time on push notification alert, the time that notification has been sent, i know that there is no child property of alert which can hold date and time, so plz. guide me that is there any way to do it (we are sending notification from server side through a php written cms), i want to display date and time at the top right of the notification alert against the sender name, plz. guide thanx and Regards Saad.
The time when you receive notification may be used to be shown at the right side.
But it is not reliable way, as user can skip any notification. iPhone framework adds icon badge based on value sent in notification.
What you can do is, you can check that value and if it is greater than 0, you can connect to your server by yourself and download the pending notification against that specific user.

Categories