roycezhc / javapns

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

Push succeessful but nothing on the device #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi all,

I tried using javapns as follows : 
Issue : Nothing came on the device.!
Code:
-------
private static String certificate = "path_to_cer/Certificates.p12";
    private static String passwd = "*****";
private static String deviceToken = "00000000000000000000000000";

Push.alert("Push!", certificate, passwd, false, deviceToken);
            PushNotificationPayload payLoad = new PushNotificationPayload();
            try {
                payLoad.addAlert("Push!!");
                payLoad.addBadge(10);
            } catch (JSONException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

Log:
------
0 [main] DEBUG javapns.notification.Payload  - Adding alert [Push!]
499 [main] DEBUG javapns.communication.ConnectionToAppleServer  - Creating 
SSLSocketFactory
523 [main] DEBUG javapns.communication.ConnectionToAppleServer  - Creating 
SSLSocket to gateway.sandbox.push.apple.com:2195
1338 [main] DEBUG javapns.notification.PushNotificationManager  - Initialized 
Connection to Host: [gateway.sandbox.push.apple.com] Port: [2195]: 
44050988[SSL_NULL_WITH_NULL_NULL: 
Socket[addr=gateway.sandbox.push.apple.com/17.149.34.66,port=2195,localport=5963
5]]
1340 [main] DEBUG javapns.notification.PushNotificationManager  - Building Raw 
message from deviceToken and payload
1341 [main] DEBUG javapns.notification.PushNotificationManager  - Built raw 
message ID 1 of total length 74
1341 [main] DEBUG javapns.notification.PushNotificationManager  - Attempting to 
send notification: {"aps":{"alert":"Push!"}}
1341 [main] DEBUG javapns.notification.PushNotificationManager  -   to device: 
40245253e43864cf112d4589e3db8aafee931bf8ea394516b87a33b6acfddbe1
2175 [main] DEBUG javapns.notification.PushNotificationManager  - Flushing
2175 [main] DEBUG javapns.notification.PushNotificationManager  - At this 
point, the entire 74-bytes message has been streamed out successfully through 
the SSL connection
2175 [main] DEBUG javapns.notification.PushNotificationManager  - Notification 
sent on first attempt
2175 [main] DEBUG javapns.notification.PushNotificationManager  - Reading 
responses
7180 [main] DEBUG javapns.notification.PushNotificationManager  - Closing 
connection
7180 [main] DEBUG javapns.notification.Payload  - Adding alert [Push!!]
7180 [main] DEBUG javapns.notification.Payload  - Adding badge [10]
BUILD SUCCESSFUL (total time: 7 seconds)

Thanks in advance..

Happy coding

Original issue reported on code.google.com by rahu1...@gmail.com on 31 Oct 2012 at 11:02

GoogleCodeExporter commented 9 years ago
i have incounter the same problem !!
when i send fast it tell me succeessful but nothing on the device

Original comment by liu4ze4h...@gmail.com on 9 Nov 2012 at 4:01

GoogleCodeExporter commented 9 years ago
We are having same issue. Everything is going well but nothing on device. Any 
ideas on how to debug this. 

Original comment by ki...@crispygam.es on 20 Nov 2012 at 10:28

GoogleCodeExporter commented 9 years ago
We have the same issue, seems to be a java 1.7 issue. Are you using java 7 ?

Original comment by so...@schantz.com on 21 Nov 2012 at 2:26

GoogleCodeExporter commented 9 years ago
Works fine for me on 1.7.0_10 x64 on Linux.

Original comment by cr...@fancred.com on 21 Dec 2012 at 1:32

GoogleCodeExporter commented 9 years ago
I have the same prob, sent successfully but not getting anything on device.

Original comment by norbert....@gmail.com on 2 Feb 2013 at 11:03

GoogleCodeExporter commented 9 years ago
Please follow the Troubleshooting Guide and report any issue that arises:

http://code.google.com/p/javapns/wiki/Troubleshooting

Original comment by sype...@gmail.com on 5 Feb 2013 at 7:27

GoogleCodeExporter commented 9 years ago
Closing for lack of feedback from original poster.

Original comment by sype...@gmail.com on 1 Mar 2013 at 5:38