When opening the application and the device is not connected on the internet, `Dialog` pops-up and if positive button clicks, app closes.

It's simple but I can't seem to find any.

My MainActivity: (actually has another name HomeAcitivty)

```
package tk.protvapp.protv;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;

public class HomeActivity extends AppCompatActivity {
    private static final String TAG = "MainActivity";
    private AdView mAdView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        MobileAds.initialize(this, "");
        mAdView = findViewById(R.id.adView);
        AdRequest adRequest = new AdRequest.Builder().build();
        mAdView.loadAd(adRequest);
    }

    public void onClickToScreenfox(View v) {
        Intent intent = new Intent(HomeActivity.this, FoxActivity.class);
        startActivity(intent);
    }

    public void onClickToScreendch(View v) {
        Intent intent = new Intent(HomeActivity.this, DisneychannelActivity.class);
        startActivity(intent);
    }

    public void onClickToScreendxd(View v) {
        Intent intent = new Intent(HomeActivity.this, DisneyxdActivity.class);
        startActivity(intent);
    }

    public void onClickToScreendlk(View v) {
        Intent intent = new Intent(HomeActivity.this, LinksActivity.class);
        startActivity(intent);
    }
}

```