This is a migrated thread and some comments may be shown as answers.

PushPlugin

13 Answers 96 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
OfficeHeart
Top achievements
Rank 1
OfficeHeart asked on 26 Mar 2013, 04:09 PM
Hi,

I implemented the PushPlugin as the example code. Works great!
But when I receive a message and the app is in background, the app crashes....
Any suggestion?

Thanks,
Martin

13 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 27 Mar 2013, 09:48 AM
Hello Martin,

We have the following questions:
  1. What example code do you refer to?
  2. What is your platform (iOS or Android)?
  3. What is the exact device and OS version? Have you tried on more than one device?
  4. Can you post a log from the device when you deploy the application? For Android you can do that by going to where "ADB" (Android Debug Bridge) is extracted on your system. When Graphite is started ADB is extracted in your temp folder. Start command prompt, type "cd %TEMP%". Search for adb.exe, it should be somewhere in your temp folder. After you find it type "adb logcat > c:\logcat.txt", after that press "ctrl +c". There will be a logcat.txt file in your root folder. Attach it to this post so we can check it out.
    For iOS, please install and open iPhone Configuration Utility and in it go to the Console of your device. Click the clear button and run your app again. Provide any log messages that may appear there.

Regards,
Steve
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
OfficeHeart
Top achievements
Rank 1
answered on 27 Mar 2013, 03:07 PM
Hi Steve,

Straight to you questions:
1. https://github.com/phonegap-build/PushPlugin
2 Android 4.1.1
3 HTC One X
4 Ok how can I attach a file in this forum?

Thanks,
Martin

0
Steve
Telerik team
answered on 27 Mar 2013, 04:58 PM
Hi Martin,

Thanks for the clarification. You can upload the log to any free file sharing service and give us a link here or send it to our support at icenium dot com email.

Kind regards,
Steve
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
OfficeHeart
Top achievements
Rank 1
answered on 27 Mar 2013, 06:13 PM
Hi,

http://www.sendspace.com/file/i1lfwm

Thanks in advance,
Martin
0
Steve
Telerik team
answered on 28 Mar 2013, 02:42 PM
Hi Martin,

Thank you for providing the log, however we did not find any information that could be relevant to the push plug-in crashing your application.

We would appreciate if you isolate the issue in a sample project and provide it to us, so we can run it locally and try to reproduce the problem. Once we have more information, we would get back to you.

Kind regards,
Steve
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
OfficeHeart
Top achievements
Rank 1
answered on 29 Mar 2013, 10:16 AM
Hi,

I made a sample project in my icenium account, named OHSandbox.

I'm sending the push notifications with gcmserver:
http://distriqt.com/wordpress/wp-content/uploads/2012/08/GCMServer.zip
You have to fill in only the api key.

Thanks in advance,
Martin
0
Steve
Telerik team
answered on 02 Apr 2013, 12:54 PM
Hi Martin,

We've tested your application on our end with the HTC One X phone but could not reproduce the problem. The main difference is that our One X is running the 4.0.3 Android and we're not really willing to upgrade it to Jelly Bean yet, as we need to have a number of devices running particular Android versions. Moreover its bootloader is locked and downgrade to 4.0.x would not be easy (if possible at all). However we tested your application on a couple of 4.1.x devices and could not reproduce the problem you've encountered there either.

So our question is, are you able to reproduce this problem on any other device other than the HTC? If so, can you share concrete steps to reproduce?

Regards,
Steve
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
OfficeHeart
Top achievements
Rank 1
answered on 05 Apr 2013, 11:39 AM
Hi Steve,

Thank you for testing the application. But what did you test exactly?
The push notifications work when the app is in foreground, but when the app is in the background, it force close when receiving the notification.
Can you confirm that tested both situations?

I tested on a HTC desire with android 4.0.4. The same problem. We have no other devices than HTC, but we will try to get one.

Thanks,
Martin 
0
Steve
Telerik team
answered on 09 Apr 2013, 01:38 PM
Hello Martin,

We have tested the scenario as per your description i.e. when the app is in the background, notifications are still received and app does not crash.

The only difference is we've used our own server implementation using node.js, as we could not get yours to run (expecting registration ID as input?!) I've attached our testing server and application for your convenience.

You should install node.js and starting the server is done through console cmd: node sampleserver.js.
Make sure to change the API key in sampleserver.js and update the IP address in index.js to the IP address of your machine that would be used as server.

All the best,
Steve
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Kendo UI Dojo.
0
OfficeHeart
Top achievements
Rank 1
answered on 10 Apr 2013, 08:47 AM
Hi Steve,

Thank you for the sample projects. I can confirm that it works fine. Also in my own app on HTC.

But when I sent a message with gcm server, I have still the same problem. I also tryed PushSharp. Also on your sample app.
So if I sent a message with node.js sampleserver it works fine. But if I sent a message with GCM server or PushSharp it crashes.

Any suggestion to resolve this strainge problem?

Thanks,
Martin
0
Steve
Telerik team
answered on 10 Apr 2013, 12:17 PM
Hi Martin,

As we see it, you have several options:
  • find another properly working server.
  • contact the person who created your GCM server, report the problem and wait for a fix.
  • use Fiddler or any other http debugging proxy to track down the requests/responses to/from the server and compare them to the one from our server. This way you can try to identify the problem and fix it yourself.
Regards,
Steve
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Kendo UI Dojo.
0
OfficeHeart
Top achievements
Rank 1
answered on 02 May 2013, 03:10 PM
Hello Steve,

After some other projects I investigate the GCM problem:

I found out that the problem exists when sending json to the icenium app:
Content-Type: application/json

When the app is not in foreground, it will crash when receiving a GCM message with JSON.

Could you  test the node.js PluginServer with JSON payload? I am almost sure that you can reproduce the problem..

Thanks in advance,
Koen
0
Steve
Telerik team
answered on 08 May 2013, 08:57 AM
Hello Martin,

Are you by any chance constructing a js object and try to send it as GCM message as is without invoking JSON.stringify first? If that is not it, can you please provide us with the modified node.js and the string you're trying to send?

All the best,
Steve
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Kendo UI Dojo.
Tags
Report a bug
Asked by
OfficeHeart
Top achievements
Rank 1
Answers by
Steve
Telerik team
OfficeHeart
Top achievements
Rank 1
Share this question
or