Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8940473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:02:39+00:00 2026-06-15T11:02:39+00:00

This app must not work without active Internet connection. But, checking Internet connection via

  • 0

This app must not work without active Internet connection. But, checking Internet connection via ConnectivityManager and NetworkInfo does not work if firewall apps like DroidWall have denied access to Internet (firewall rule).

How can I detect that some firewall app has blocked Internet access to my app?

For example, if I start Google Play Store app, it clearly states “No Internet connection”. If I start my app, it hangs (trying to download content) and then crashes with an error.

EDIT

This is error caught by Logcat.

12-05 12:44:51.417: E/AndroidRuntime(18922): java.lang.RuntimeException: An error occured while executing doInBackground()
12-05 12:44:51.417: E/AndroidRuntime(18922):    at android.os.AsyncTask$3.done(AsyncTask.java:278)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at java.lang.Thread.run(Thread.java:856)
12-05 12:44:51.417: E/AndroidRuntime(18922): Caused by: java.lang.NullPointerException
12-05 12:44:51.417: E/AndroidRuntime(18922):    at com.app.android.MainActivity$ParserAsyncTask.doInBackground(MainActivity.java:345)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at com.app.android.MainActivity$ParserAsyncTask.doInBackground(MainActivity.java:367)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at android.os.AsyncTask$2.call(AsyncTask.java:264)
12-05 12:44:51.417: E/AndroidRuntime(18922):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
12-05 12:44:51.417: E/AndroidRuntime(18922):    ... 5 more

As you see, the mechanism which detects whether Internet connection (wifi or mobile data) exists or not failed as the app was started and the parser started downloading remote content.

I need to implement additional feature which will allow Internet connection mechanism to check if some app is blocked by some firewall rule (like Play Store app does).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:02:39+00:00Added an answer on June 15, 2026 at 11:02 am

    If your application is crashing then it’s throwing an exception you are not catching.

    Try to surround your connection code with try/catch and pop a toast notification that there is no internet connection available in the catch. Also, post the exception from the debugging tools? I’m curious what exception you are getting since you haven’t posted any code…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This app I completed around a year ago (!) but never launched it on
This app displays a form with a textbox where the user is supposed to
In this app I want that as I click on button the data from
I am writing this app in windows form c#. When user exit from this
When the users of this app make changes to the fields a large amount
So I have this app which needs to query entities from the Azure Tables
So I have this App in the store, and I would like to release
So im making this app where user could add UP to 3 images to
I had this app using 1.9.2 and rails 3.2 and today I changed the
I can successfully do this: App.SomeCollection = Backbone.Collection.extend({ comparator: function( collection ){ return( collection.get(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.