[solved] Mobile App Support - Push Messages - No notification sound

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
User avatar
aLiEnHeAd
Posts: 64
Joined: 02 Feb 2017 15:09

[solved] Mobile App Support - Push Messages - No notification sound

Post by aLiEnHeAd » 28 Apr 2019 01:01

Hi!
I use the Popp HUB App to control Z-Way.
If I get push notifications (from a logical rule) there is no notification sound on my android phone, but the push test message plays my notification sound.
I noticed that these seem to be two types of notifications.
The one that works with sound is grey and says "Popp HUB" as subject. The one without sound says "Z-Way Control" as subject and has a red icon...
See attached screenshot
Any ideas?!

Z-Way: v2.3.8
Mobile App Support 1.3.4
Attachments
Screenshot_20190427-233705.png
Screenshot_20190427-233705.png (34.49 KiB) Viewed 203 times
Last edited by aLiEnHeAd on 29 Apr 2019 08:32, edited 1 time in total.

User avatar
aLiEnHeAd
Posts: 64
Joined: 02 Feb 2017 15:09

Re: Mobile App Support - Push Messages - No notification sound

Post by aLiEnHeAd » 28 Apr 2019 01:55

OK... got it.
in MobileAppSupports index.js for command "alarm" the message creation for android phones is wrong. I changed it from

Code: Select all

message = {
                                                     to: deviceToken,
                                                     notification: {
                                                             title: "Z-Way Control",
                                                             body: alarmMessage
                                                     }
to

Code: Select all

                                        if (os === self.ANDROID) {
                                                message = {
                                                        to: deviceToken,
                                                        data: {
                                                                type: "alarm:message",
                                                                data: alarmMessage,
                                                                hubId: hubId
                                                        }
                                                }
                                        } else if (os === self.IOS) {
                                                message = {
                                                        to: deviceToken,
                                                        notification: {
                                                                title: "Z-Way Control",
                                                                body: alarmMessage
                                                        }
                                                }
                                        }
and now it works 8-)

User avatar
PoltoS
Posts: 4675
Joined: 26 Jan 2011 19:36

Re: [solved] Mobile App Support - Push Messages - No notification sound

Post by PoltoS » 10 Jun 2019 22:40

Looks like your change is not applicable to the latest develop branch anymore. What version are you on?

User avatar
aLiEnHeAd
Posts: 64
Joined: 02 Feb 2017 15:09

Re: [solved] Mobile App Support - Push Messages - No notification sound

Post by aLiEnHeAd » 11 Jun 2019 09:14

PoltoS wrote:
10 Jun 2019 22:40
Looks like your change is not applicable to the latest develop branch anymore. What version are you on?
Perhaps someone else already fixed it on the dev branch but it has not been released yet?
My Versions:
Z-Way: v2.3.8 UI: 1.9.0, build date: 24-09-2018 14:06:19
Mobile App Support 1.3.4 (stable)

Post Reply