Service Notification Not Displaying On First Connection
Closed this issue · 6 comments
There is a bug where after a new installation and on first connect after VPN permissions are granted, the notification service does not display but the app successfully connects to the VPN server. Every other connection works fine with notification service working. Looked into your source code but couldn't find the issue. Annoying bug. Please look into this, thanks in advance!
Hello
Are you testing our release apk on github releases?
What is your test device?
We had this bug in the past but I thought it was fixed.
Yea I am using the latest apk (v6.1813) and my test device is a physical Huawei (model VOG-L04) running Android 10 and EMUI 11.0.0.
v4.1810 also has the same issue
@dev7dev Could you tell me what you did to try to fix it before? I can try to help you find out why the bug is occurring again. Thanks man.
Everything about notifications is in NotificationService class.
I don't remember exactly, but I think I added this code to quickly display the notification and the problem was solved on my test devices.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { notifcationBuilder.setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE); } else { notifcationBuilder.setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_DEFAULT); }
Could you test if the bug exists still on your test devices currently? Trying to see if it is just an issue with my test device or if it's a universal bug. Thanks!
I have this device for test :
Xiaomi note 8, Xiaomi redmi note 11 , Xiaomi note 13t pro.
Samsung s7 edge , Samsung note 20 , Samsung s24 ultra.
I have not seen this problem on these devices.