How Android WiFi booster apps work

When a mobile has slow wifi connection, most of people try to download some wifi booster application from Google Play.

But do they work? Do they really fix the wifi connection or this is just a lie? Checking the comments, you can be confused because there are people who reported good results and others who had negative experience.

But what is the truth? I tried to collect the reasons and the explanations.

What wifi booster apps can do

Usually, they do only two things:

  1. disconnect than reconnect to the wifi network.
    However it seems to be a stupid thing, it can work but only in two cases:

    • if the router can dynamically change channel and the channels are overcrowded (there are too many overlapping networks). In that case the router may change the used channel to a less overlapping one when the mobile reconnects. It can only work if the router supports this mode and it is enabled!
    • The other case, when there are other routers in the same network (usually it happens in enterprise environment, very rare in home network). In that case, if there is another router with better signal, the mobile will reconnect to this router instead of the previous one.
  2.  tell the system to use wifi in high perf mode.
    It works only from Android 3.1 (HONEYCOMB_MR1) and only if the device (the hardware) also supports it. Some devices have several power saving modes, if a program uses this high perf mode, the system tries to prevent the device to go power saving mode. It can increase the performance.
    But you have to know that this is not a special thing and not only used by booster applications. Usually, high perf mode is used by any applications that need good wifi performance. For example if you are using an application that downloads something from the Internet or use Voice over IP (voice chat), it uses this mode (mostly). And because most applications use this mode, using booster app will not have any additional effect as high perf mode has been already set.

And here is what the booster apps cannot do:

  • Increasing the maximum send signal power. This is not possible because it is limited in the most countries by laws thus the manufacturers also limit it and do not allow to set higher value. And because there is no official android API to access the deep level settings of the network card even if the hardware supports some.
  • Increasing the receive signal power. This is also not possible because it would need stronger/bigger antenna and of course a program cannot change the physical parameters of a device. Don’t forget, this is a two-way communication, even if the router can receive the signal of the mobile, the mobile also needs to receive the signal of the router and vice versa. The smaller antenna of the mobiles have worse performance and it cannot be changed by a program.

To summarize the above states, the booster applications can work in special cases but not really often.
High perf mode is used by normal applications too (and this is the preferred way because they will use this mode only when they need it, to save your battery, instead of to use it always and discharge your battery very fast).

About the reconnecting, you can even do it manually (turn off/on wifi) and can work only in the mentioned special cases. Instead you should use some analyzer application to detect network bottlenecks. They can help you to detect overlapping networks and find the best channel. Also they can warn you for other problems too.

So I think the effect of the wifi booster apps mostly based only on the belief. They don’t really have possibility to fix a bad wifi connection.

Android: how to solve adview CPU consuming

adview can consume CPU when the application is in the background… This is a very common problem. Even if the application in the background or has been stopped, it can consume the CPU continuously.

Other symptom, if you disable ads, the CPU usage is minimal or zero.

This is caused by several reasons including possible adview bug too. Here, you can see how to solve the high CPU usage problem:

The first one is to destroy the adview in onDestroy() and onPause() (don’t forget to recreate it in onResume() and onCreate()):

private void destroyAdView() {
    if (adview != null) {
        adview.destroy();               
    }   
}

@Override
public void onDestroy() {
    destroyAdView();
    super.onDestroy();
}

@Override
public void onPause() {
    destroyAdView();
    super.onDestroy();
}

In newer admob sdk you can call adview.onPause() and adview.onResume() functions, but my experience that sometimes they don’t do what they promise.

If adview still consumes CPU, there is a second solution: removing the full adview from the layout, not only destroying it:

private void destroyAdView() {
    if (adview != null) {
        // In my case the adview has been added to a relativelayout
        RelativeLayout layout = (RelativeLayout) mainView.findViewById(R.id.adRelativeLayout);
        layout.removeView(adview);
        adview.destroy();               
    }   
    }

The two solutions above should solve the high CPU usage problem. Excepting only one case:
If you are using the new Google Play services library for adview. Google will only support this admob library after august, 2014.
It seems there is a bug in the library:
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/1aidjtsin8A
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/Qu4G19NFAuI

So if you experience high CPU usage after switching to the new library, you can use a workaround (pausing webview can have other effects too, so use it for your own risk):

@Override
    public void onDestroy() {
        destroyAdView();
        super.onDestroy();
    }
private void destroyAdView() {
    if (adview != null) {
        // In my case the adview has been added to a relativelayout
        RelativeLayout layout = (RelativeLayout) mainView.findViewById(R.id.adRelativeLayout);
        layout.removeView(adview);
        pauseWebView(adview);
        adview.destroy();               
    }   
    }

private void pauseWebView(ViewGroup v) {
    for (int i = 0; i < v.getChildCount(); i++) {
        View child = v.getChildAt(i);
        if (child instanceof WebView) {
            ((WebView) child).pauseTimers();
        }   
        pauseWebView((ViewGroup) child);
    }   
}

And finally, here is how I am creating the adview and a full example:

@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
...
createAdView();
...
}
private void createAdView() {
    if (adview == null) {
        RelativeLayout layout = (RelativeLayout) mainView.findViewById(R.id.adRelativeLayout);
        LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);

        layout.setLayoutParams(lp);
        RelativeLayout.LayoutParams adsParams = new RelativeLayout.LayoutParams(
                RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
        adsParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
        adsParams.addRule(RelativeLayout.CENTER_IN_PARENT);

        adview = new AdView(fragmentActivity);
        adview.setAdSize(AdSize.BANNER);
        adview.setAdUnitId("ca-xxxx");
        final AdListener listener = new AdListener() {
            @Override
            public void onAdLoaded() {
                //Here we will display the adview if there is ad
                adview.setVisibility(View.VISIBLE);
                super.onAdLoaded();
            }
        };

        adview.setAdListener(listener);

        //This needs to remove empty space when ad is not loaded, for example no internet conn.
        adview.setVisibility(View.GONE);

        layout.addView(adview, adsParams);

        AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
        .build();
        adview.loadAd(adRequest);
    }   
}

void resumeWebView(ViewGroup v) {
        for (int i = 0; i < v.getChildCount(); i++) {
            View child = v.getChildAt(i);
            if (child instanceof WebView) {
                ((WebView) child).resumeTimers();
            }
            try {                
                resumeWebView((ViewGroup) child);
            } catch (Exception e) {
                e.printStackTrace();
            }            
        }
    }

void pauseWebView(ViewGroup v) {     
        for (int i = 0; i < v.getChildCount(); i++) {
            View child = v.getChildAt(i);
            if (child instanceof WebView) {
                ((WebView) child).pauseTimers();
            }
            try {                
                pauseWebView((ViewGroup) child);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

private void destroyAdView() {
        if (adview != null) {
            RelativeLayout layout = (RelativeLayout) mainView.findViewById(R.id.relativeLayout);
            layout.removeView(adview);            
            adview.destroy();            
            adview = null;
        }

    }

 @Override
    public void onPause() {
        if (adview != null) {
            adview.pause();
            pauseWebView(adview);
        }
        super.onPause();
    }

    @Override
    public void onResume() {        
        if (adview != null) {
            adview.resume();
            resumeWebView(adview);
        }
        super.onResume();
    }

@Override
    public void onDestroy() {     
        destroyAdView();
        super.onDestroy();
    }