Why does UWW need to have an icon in the status bar?

Since the last update of Unlock With WiFi, I’ve been getting this question a lot. The answer is that it doesn’t. If you don’t like it, simply turn off notifications in the settings. It’s that easy.

One thing that changed in the last update is that notifications are enabled by default. This is because having notifications turned on makes the app more reliable. Why? The answer is complicated, and a bit technical, but if you are curious, I will try to explain it.

Smartphones are computers, just like your desktop or laptop computer. However, they tend to have much less RAM (memory) than larger computers. To make up for this, the Android operating system has a memory management system that tries to make this limitation less noticeable. To understand how it works, there is one key concept to note: An app can run in either the foreground, or background. When an app is running in the foreground, it is visible to the user, and the user can interact with it. This is how most apps normally run. Some apps, like UWW, run in the background. That means that they are running even when the user is not viewing them. UWW must run in the background at all times in order to function properly.

Since smartphones have limited RAM, sometimes there’s not enough to go around. All running apps use some of the device’s RAM, and when the RAM is full, the Android operating system has to free up some of the RAM in order to keep running properly. It does this by killing background apps, therefore freeing up the memory that they were using. Android assumes that background apps are less important than foreground apps, because the app in the foreground is the one the user is currently using. This is perfectly logical, but it presents a problem for UWW. If UWW is killed by the operating system, it can no longer function.

Android knows that sometimes a background app is too important to be killed. That’s why it allows some background apps to be considered foreground apps. If an background app is considered a foreground app by Android, then Android won’t kill it to free up memory. If you want a background app to be considered a foreground app, then the app must have an icon in the status bar. This is the rule that Android imposes, and I have no control over it. The reasoning is probably that if an app is too important to be killed, then the user should be aware that it is running. When notifications are enabled in UWW, then the icon is shown in the status bar, and UWW will be considered a foreground app.

What this all means is that UWW is less likely to be killed by Android if it has an icon in the status bar. Some phones have more RAM than others, or have less apps running that use up the RAM. In such a case, UWW may not need to be considered a foreground app, since Android won’t need to kill background apps very often. However, if your phone has less RAM, or a lot of background apps running, then UWW may need to be considered a foreground app in order to avoid being killed. Whether you enable notifications is up to you, but if you find that UWW is unreliable on your device, then try running it with notifications turned on.

You may be wondering why I don’t just make UWW work without running in the background. This is simply not possible. In order to keep the phone unlocked, and to monitor events like wifi connection/disconnection and screen on/off, UWW must be running. That is the way Android works, and I can’t do anything about it. It’s unfortunate, and I consider it to be a weakness of Android, but that’s what I have to work with.

Posted in Android Apps, Tips, Unlock With WiFi