hengsokchamroeun / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

How can we check the uninstalled status? #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Could you make a simple method which only check a clientToken based on feedback 
please?

BTW, APNS feedback returns device tokens if the notification delivery has 
failed. This doesn't mean 
that the application has been uninstalled from the device, it can just be that 
the user doesn't have 
persistent WiFi? connection at the moment. How can we check the uninstalled 
status?

Thanks

Frank

Original issue reported on code.google.com by idbill.p...@gmail.com on 27 Apr 2010 at 4:24

GoogleCodeExporter commented 8 years ago
'If a provider attempts to deliver a push notification to an application, but 
the application no longer exists on 
the device, the device reports that fact to Apple Push Notification Service. 
This situation often happens when 
the user has uninstalled the application. If a device reports failed-delivery 
attempts for an application, APNs 
needs some way to inform the provider so that it can refrain from sending 
notifications to that device. Doing 
this reduces unnecessary message overhead and improves overall system 
performance.

For this purpose Apple Push Notification Service includes a feedback service 
that APNs continually updates 
with a per-application list of devices for which there were failed-delivery 
attempts. The devices are identified 
by device tokens encoded in binary format. Providers should periodically query 
the feedback service to get the 
list of device tokens for their applications, each of which is identified by 
its topic. Then, after verifying that the 
application hasn’t recently been re-registered on the identified devices, a 
provider should stop sending 
notifications to these devices.

Access to the feedback service takes place through a binary interface similar 
to that used for sending push 
notifications. You access the production feedback service via 
feedback.push.apple.com, port 2196; you access 
the sandbox feedback service via feedback.sandbox.push.apple.com, port 2196. As 
with the binary interface 
for push notifications, you should use TLS (or SSL) to establish a secured 
communications channel. The SSL 
certificate required for these connections is the same one that is provisioned 
for sending notifications. To 
establish a trusted provider identity, you should present this certificate to 
APNs at connection time using 
peer-to-peer authentication.

Once you are connected, transmission begins immediately; you do not need to 
send any command to APNs. 
Begin reading the stream written by the feedback service until there is no more 
data to read. The received data 
is in tuples having the following format:

time, token length, token id'

This would indicate to me that there is no way to discern between failed 
connectivity issue and a removed app.

Original comment by idbill.p...@gmail.com on 27 Apr 2010 at 4:33

GoogleCodeExporter commented 8 years ago

Original comment by idbill.p...@gmail.com on 27 Apr 2010 at 4:36

GoogleCodeExporter commented 8 years ago
very clear!

Thanks

Original comment by fwu2...@gmail.com on 27 Apr 2010 at 9:39

GoogleCodeExporter commented 8 years ago

Original comment by idbill.p...@gmail.com on 27 Apr 2010 at 10:42

GoogleCodeExporter commented 8 years ago
FYI, There was a company called Pinch Media, that recently became Flurry: 
Analytics that would track app installs.

http://www.flurry.com/product/analytics/index.html

Now for the down side... Apple's new policy doesn't allow any analytics so that 
won't work... but that would 
indicate that Apple is gearing up provide their own version.

Bill

Original comment by idbill.p...@gmail.com on 28 Apr 2010 at 10:04