Welcome! Log In Create A New Profile

Advanced

[WM20] - Push notification does not work in all mobiles

Posted by YogiYang 
[WM20] - Push notification does not work in all mobiles
March 27, 2019 02:34AM
Hello,

I have an app which is working properly in most of the mobiles.

But yesterday I got a complain from two users that the they is not getting any push notification.

One of the user who has complained is using Samsung Note 8 and the other one is using Panasonic phone.

On further investigation I observed that on both these phones are not getting registered with Google's GCM.

The code I am using is:

//Register for Notification Here
NotifPushEnable(ActivatePushNotif,notifPushAllNotif)
NotifPushProcedure(ReceivePushNotif)
//=======================================
PROCEDURE ActivatePushNotif(bufIdentifier is Buffer, sError is string)

sRegURL is string

IF InternetConnected() = False THEN
	RETURN
END

IF Length(bufIdentifier) > 0 THEN
	//Call remote Script to sinder the PhoneID in DB  
	sRegURL = "[XxXxX.XXX];
	sRegURL = StringBuild(sRegURL,bufIdentifier)
	
	HTTPRequest(sRegURL)
ELSE
	// Returns the error returned by the service
	Error("Registration error: ", sError)
END


Is there any setting which we can change on the phone to get Push Notification to work as expected?

TIA

--
Yogi Yang
Re: [WM20] - Push notification does not work in all mobiles
March 23, 2020 12:53PM
I have exactly the same problem on some Android phones - I see no one responded here. Did you ever get this resolved?
Re: [WM20] - Push notification does not work in all mobiles
March 25, 2020 08:22AM
Hello,

Actually I did not solve this but found out that later versions of Android are automatically either suspending or closing app which move to background.

It is this behavior of Android that is hindering apps from receiving Push Notification. But if you start the app or bring it to foreground immediately all the Push Notifications will be received by the app.

HTH

--
Yogi Yang
Re: [WM20] - Push notification does not work in all mobiles
March 28, 2020 07:37AM
Hi

I have seen this as well. Some Android versions on phones will set some apps to sleep so as to save battery - you can switch this off for some apps.

I still have the problem of not registering at all - I get nothing returned when registering the phone in the first place.

Still investigating.

Cheers
André
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: