iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello Crosslight Support,
I just wanted to test the Push Notification feature. Therefore I started the Sync sample on my Android device. Before starting I changed the PushRegistration mode to OnAppStart. I turned on WLAN access on my device. I thought that is all I have to do to receive a push notification.
After that I opened my browser and navigated to http://staging1.intersoftsolutions.com/SyncSample/Push/SendNotification
I entered a title and a message and clicked Send. Unfortunately, I never received a push notification on my Android device.
What could be wrong? Do you really deliver the push notification on your end?
Same behaviour on my Windows Phone. No push notifications received (Update: I received a push notification on the next day. What is the latency time for message delivery at your end?).
Thanks for clarifying.
Thomas
Hello Yudi,
I just tested and it seems to work as expected. The error message no longer appears.
I had some difficulties to get the sample up and running. I re-download the sample from the master branch and I then updated the NuGet packages to 667-experimental. Doing that the build failed with "cast error IUser to User". Applying NuGet packages 662-experimental finally worked. Maybe it's worth taking a look at that.
Thanks,
I’m currently working on this ticket and need more time to provide you with solution, suggestion, or sample.
I’ll get back to you as soon as possible.
Edited on April 4, 2016 6:15 AMReason: Update post
... Update: I received a push notification on the next day. What is the latency time for message delivery at your end?
The latency time for message delivery is depend on Google timing and schedule.
There are topics that discuss on how to avoid delay in Android GCM messages like: "keeping the connection alive with a ping every interval of time from the GCM server". Hope this helps.
I never received a push notification on my Android device.
So, is the message delivered at your end?
How reliable is it to use your (Intersoft Crosslight)push notification implementation?
I used this url (http://staging1.intersoftsolutions.com/SyncSample/Push/SendNotification) to trigger the sending of a push notification. As I used the sample as it is, my device registered at your database, too. Does every user who registered at your database get a push notification when I send one over the url given above?
I created a video which shows how the sample works on my local end. I use http://staging1.intersoftsolutions.com/SyncSample/Push/SendNotification page to send notification and use SyncSample from data-os-sync-pns repository.
Please find the video in the attachment, staging_pns.zip.
Does every user who registered at your database get a push notification when I send one over the url given above?
Yes. Every user who login will get push notification when send one over the url given above.
Thank you for your response.
I installed the data-os-sync-pns sample on my device (API21). I started debugging, I registered and I logged in. After that I hit the "OnDeviceTokenReceived" method.
My token was "APA91bEe9xcKWKJ-Qvrq9yDEdGl85GzmYymmCKEa99aJGQcKyM-bWBcdUU4x-PXR34NDAa8YXol33cKzEtYxLhrCQn2T__r-rup40_-dkJ6GORN6077qxGsNYAhvTceSsK5BOf_8QknR".
My user id was "197f6896-88bd-4e9b-848e-48efa5a8a5ee".
Maybe you could check in your database, if there is a saved record for this token and user.
After that I opened the browser(http://staging1.intersoftsolutions.com/SyncSample/Push/SendNotification) and send some messages (qwertzuiop, test43 - qwertzuiop, test44 - qwertzuiop, ...).
As another registered user you should have received these push messages.
On my device I haven'treceived any of these messages. No matter, if I have the app active, in the background or not running. I never received any notification. I am online through WIFI and my test device has no SIM card inside. Could this be a problem?
In your video it seems you get the notification on the fly. Could it be a problem that I am in Europe?
I hope you have any idea.
... and send some messages (qwertzuiop, test43 - qwertzuiop, test44 - qwertzuiop, ...).As another registered user you should have received these push messages.... I am online through WIFI and my test device has no SIM card inside. Could this be a problem?
... and send some messages (qwertzuiop, test43 - qwertzuiop, test44 - qwertzuiop, ...).
... I am online through WIFI and my test device has no SIM card inside. Could this be a problem?
I turned on my test device this morning and received the push message. Please kindly check the enclosed video (2016_04_07_08_29_47.zip) which shows the pushed message.
My Nexus 4 also online through WiFi and has no SIM card inside.I just pushed a minor modification to the data-os-sync-pns sample. The googleProjectId in the contructor of CrosslightAppAppService (AppService.cs) in the Core project is replaced with the new generated project number. Could you please update the sample and re-test the push notification with this new googleProjectId?
I just tested with the new Google Project Id. It works much better.
I changed the Google Project Id and in the OnNotificationReceived I added a ToastPresenter which shows the message text of the notification. I started the app in debug mode and I logged in. I sent a message through the "staging" web site. The message was delivered immediately and the toast presenter showed the text. The same happens when the app is in the background. In both cases I have no system notification. When the app is not running, I receive a system notification and when I click on it the app starts. Is it ok that I only receive a system notification when the app is not running?
When I close the running app, turn of WIFI, turn off the phone and turn the phone on again, I receive a message: "SyncSample.Android.Material was closed". Is this a bug or a feature? (Update: WIFI is turned off, I start the app, I shut down the app, I turn device off and on again - the message appears. Is the app running as background process and killed by the system?)
What did you change with the new Google Project Id? Is there anything I have to keep in mind when I set up my own Google Project?
By the way. This won't compile:
string googleProjectId = "974552766075"; string googleProjectId = "215237119337";
I modified the SyncSample by showing ToastPresenter in OnNotificationReceived. Next, made some test based on your test scenario. Please kindly check the attached video which shows that system notification is received when the app is in following state: suspended, off, and killed.
I got following message after follow your instruction: "Unfortunately SyncSample.Android.Material was stopped". This has been forwarded to the development team to be investigated further. The report is filed under CROS-1109.
I'll keep you informed with any news I heard from the team regarding the progress of CROS-1109.
On the day when I pushed the new Google Project Id to the data-os-sync-pns repository, I also renew the API key in the staging server. This is the key which required by RegisterGcmService() method in global.asax.cs file (Web API project). Example:
protected void Application_Start() { IocContainer.Current.Register<iappdomaininfo, appdomaininfo="">(); AreaRegistration.RegisterAllAreas(); EntityServerConfig.Initialize(); ... PushServiceManager.Instance.RegisterGcmService(new GcmPushChannelSettings("A1azSyCyBvUzGjAsWAlVRqh3VC497zAzhNrBKMU")); ... }
Thanks again for your investigations. I did the same as you in the attached video. Besides the app is in the background and another app is active scenario, I had the same results as you. In the case app is in the background and another app is active, I had no system notification only the toast message.
When I turned on my device I haven't received any of your messages. This is strange because I am registered and should have received all your notifications, too. I still wonder if this push notification service is reliable.
A fix for CROS-1109 would be nice, because with this error message I cannot use push notifications in production apps.
Hello Thomas,
I performed five different scenarios using our test device . The detail of the devices are:
And here are the detail of the scenarios.
Test #1: App is active
Steps:
Test #2: App is suspended
Test #3: App is off
Test #4: App is killed
Test #5: Device is restarted
The table below shows the summary of the test result.
Could you please try to test the sample (SyncSample from data-os-sync-pns repository) with these scenarios and let me know the result. Test result from two or more devices will helps much.
I had an interesting experience with a device, Xiaomi, where it requires additional steps to be able to receive push notification. Check out this tips from their website to see in detail. You can also test the push notification of the device using Google apps like Hangouts. If I'm not mistaken, Hangouts uses GCM.
I will test the described scenarios with other devices, too. And let you know the results.
The real show stopper at the moment is CROS-1109. Is there already a fix for this?
Thank you very much for your patience and cooperation. The test result will helps to identify the problem related to the push notification feature.
As of today nightly-build hotfix for CROS-1109 is not yet available. As soon as the hotfix is ready, I will let you know.
do you have any news about CROS-1109? I should deliver an app using push notifications, but this error message stops me from doing so.
Will CROS-1109 be fixed with the next stable version? When will Crosslight 5 Update 2 will be available? If you keep up your monthly release cycle, it should be available soon.
I'm sorry for any inconvenience this problem may have caused you. The team is working to fix the problem reported under CROS-1109 and do their best to be available in Crosslight 5 Update 2.
The Crosslight 5 Update 2 is expected to be delivered within this week or early next week.
Unfortunately, CROS-1109 is not on the fix list of Crosslight 5 Update 2. When will this bug be fixed?
The backlog is already queued in our work items. However, it hasn't completed yet due to work items priorities and urgency.
I'll check with the Crosslight development team regarding the release schedule of CROS-1109. Will get back to you as soon as possible.
Any date when this will finally be fixed?
The reported problem under CROS-1109 is a bit chalenging since the problem happen after restart the device. I'll keep you informed with the progress of the backlog.
Thank you for your patience and cooperation.
Any news about the challenging CROS-1109 bug?
When will CROS-1109 finally be fixed? I am waiting for weeks.
I have news related to CROS-1109.
Recently, there are commits in the Sync-Sample (data-os-sync-pns repository) which fix the problem reported under CROS-1109.
I have tested these commits with Crosslight nightly-build 662-experimental and found that the message: "Unfortunately SyncSample.Android.Material was stopped" is no longer persist after user do the following actions:
Should you have different result, please feel free to let me know.
Glad to hear that the committed changes in the sample resolve the reported problem under CROS-1109
... I then updated the NuGet packages to 667-experimental. Doing that the build failed with "cast error IUser to User". Applying NuGet packages 662-experimental finally worked...
The 667-experimental NuGet packages is an experimental packages which is used to test another feature that may produce exception when tested for CROS-1109.
Should you need further assistance or run into any problems regarding our controls, feel free to contact us through our live chat service or post it into our forum. We would be happy to assist you again.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname