how to send push from app - ios6

I am making real estate app where I want to send push when any building is added. What I tried is as per below link.
Urban Airship - Send Push with NSURLConnection
Still I don't get anything.
I always get response as 401. Means push is not sent.
Any idea how to send push from code itself?

Well, we can only send push from app only when Push From Device is enabled. To get this done, we have to send email to Urban Airship requesting for push for device to be enabled.
That's it!!!

Related

Watch request successful but not receiving any messages

I am trying to get Gmail push notifications by setting up a watch notification. I went through all the steps in the Push Notification guide and received a successful historyId/expiration response, but since then all's quiet. I haven't gotten any of the emails pushed through. Any ideas?
AFAIK, your application will only receive a notification message describing the change if the mailbox update matches your watch request.
With this, try to provide the topic name and any other options in your watch() request, such as labels to filter on. For example, to be notified any time a change is made to the Inbox:
POST "https://www.googleapis.com/gmail/v1/users/me/watch"
Content-type: application/json
{
topicName: "projects/myproject/topics/mytopic",
labelIds: ["INBOX"],
}
Other than that, check your Gmail notifications settings. If that still doesn’t work, try the troubleshooting steps given here.

Cannot receive any messages or push notification because being blacklisted by Google

Recently, I got some feedbacks from my users said that they cannot receive any messages or push notification in my app. And I found that there is an issue-
String token = FirebaseInstanceId.getInstance().getToken(); token
Value is "Blacklisted" in system.
Please help me removing the blacklist from Google.

Issue with push notification using cron in Google App Engine

I am trying to perform push notification activitiy using a cron within Google App Engine. I have setup the cron successfully and it is showing no failures. Also in logs i see that Multicasts are being created for all devices which are registered. However i am not getting any push notifications. Same code if i change using a form for sending Push notifications, its working perfectly fine. Can someone guide me on what can be the issue?
Update
Below is the form i have created where i send a POST request via form. This form takes the Message from Text area and sends it to all devices.
out.print("<form name='form' method='POST' action='sendAll'>");
out.print("<fieldset>");
out.print("<textarea rows='10' cols='100' name='Message'>Enter HTML Message </textarea>");
out.print("</fieldset>");
out.print("<input type='submit' value='Send Message' />");
out.print("</form>");
When i replace them with a normal post request which reads out the message from Data folder using below code,
getServletContext().getRequestDispatcher("/sendAll").forward(req, resp);
i get success messages in GCM Logs but doesnt receive any push notification. Can someone guide on what can be the issue?
It was nothing specific to Google App Engine. Message which was created for push notifications had issue.

About google app gmail api

I was trying to send emails to my client from my application after few sent mails all mails bounces back with a message saying "You have reached a limit for sending mail. Your message was not sent." And one more thing when i see my developer console gmail api it still showing 0% usage.what is this issue? is this a bug or something else?
There's an extra limit on sending because it's a vector for abuse--it doesn't show up in the developers console but it's the same as sending via SMTP or the web interface.
This seems to have a good overview:
http://www.labnol.org/internet/email/gmail-daily-limit-sending-bulk-email/2191/

How is a push token created for passbook?

My Question:
How is a push token created for Passbook? Is APN registration required? If so, is the APN registration step to create the push token automatically executed (e.g. without requiring developer intervention) before the first REST call to register the pass with the provider when a user installs a Pass into Passbook? Apple's Passbook documentation doesn't specify how the push token arrives on the device for Passbook. It just mentions that it's something the device renders.
Background:
I've been looking at the documentation from Apple regarding updating Passes in Passbook and nowhere does it specifically state how to generate the push token for push notifications to Passbook. According to the web service reference section, the push token is passed alongside the device library identifier, the authentication token, the pass type id and the serial number in the technical spec for registration and de-registration RESTful services.
My understanding with respect to push token persistance for custom iOS apps, is that the app itself needs to register with APN servers to create a push token for that app on the device, in preparation for push notifications, before the app can send down the push token to the provider (e.g my web server). This ensures that the APNs receive a push token from the provider the the APN itself generates on the device.
APN is not required , Passbook itself take care of Push Notification
The push token is sent as payload in a json object when the registration web service get called
Passbook makes a call to the registration webservice as soon as a pass is added (and also in other cases)
It worth to say that you must use a .pem certificate on server side that comes from the certificate.p12 used to generate passes
this is how to get the push token in php
$data = json_decode(file_get_contents("php://input"));
$pushtoken=$data->pushToken;

Resources