Page 1 of 1

Do we need two notices in the Android status bar?

Posted: Thu Jul 11, 2013 10:45 pm
by schwarznavy
I have Android 4.2.2 and I'm using the latest version of OpenVPN Connect available in the Google Play store. Is there a way to get rid of one of the notices in the status bar when connected? Both of them pretty much give the same info.

Thank you.

Re: Do we need two notices in the Android status bar?

Posted: Fri Jul 12, 2013 5:33 pm
by jack0w
schwarznavy wrote:I have Android 4.2.2 and I'm using the latest version of OpenVPN Connect available in the Google Play store. Is there a way to get rid of one of the notices in the status bar when connected? Both of them pretty much give the same info.

Thank you.
Just in case another voice makes a difference, I completely agree with this point of view. :)

Re: Do we need two notices in the Android status bar?

Posted: Fri Jul 12, 2013 6:28 pm
by jamesyonan
The two notifications are something that Android requires to affirm that the VPN
session is high priority and should not be arbitrarily terminated by the system.

We originally had one notification but found that Android would often kill the VPN session without warning.

One of the notifications is generated by Android itself to show that a VPN is active. This is out of the control of the app.

The other notification indicates that OpenVPN is a high-priority service. Without this notification, Android would assume that it's okay to automatically kill the service if it goes into the background, which happens every time you switch away from OpenVPN to another app.

James

Re: Do we need two notices in the Android status bar?

Posted: Fri Jul 12, 2013 6:56 pm
by jack0w
jamesyonan wrote:The two notifications are something that Android requires to affirm that the VPN
session is high priority and should not be arbitrarily terminated by the system.

We originally had one notification but found that Android would often kill the VPN session without warning.

One of the notifications is generated by Android itself to show that a VPN is active. This is out of the control of the app.

The other notification indicates that OpenVPN is a high-priority service. Without this notification, Android would assume that it's okay to automatically kill the service if it goes into the background, which happens every time you switch away from OpenVPN to another app.

James
Once again, that makes perfect sense, and can now understand why things are the way they are!

Thanks for another thorough explanation, very much appreciated! :)

Re: Do we need two notices in the Android status bar?

Posted: Fri Jul 12, 2013 10:59 pm
by schwarznavy
Thank you for the reply. Since I know nothing about developing for Android, are there any similarities to the way that Skype is able to stay open, connected and without getting shut down by Android? Skype only has one notification...
Similarly, when I enable the wi-fi or USB tether, there is only one notification.
Could looking at those apps offer some kind of clue to a workaround?

Re: Do we need two notices in the Android status bar?

Posted: Mon Jul 29, 2013 5:44 pm
by jamesyonan
Technically, OpenVPN has only one notification icon just like Skype and other apps. There is a second notification icon that is generated by Android automatically when the VPN is active. The second notification icon is owned by Android and cannot be controlled from OpenVPN.

Skype and other service-oriented apps have one notification like OpenVPN, however since they are not VPN apps, there is not an additional notification icon generated by Android.

I think you will see that any Android VPN app that uses the Android 4.0 VPN API must have two notification icons to work properly.

James