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 8881247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:18:22+00:00 2026-06-14T20:18:22+00:00

I need to detect when the GSM phone has just been connected to the

  • 0

I need to detect when the GSM phone has just been connected to the Network(from cell tower not available to cell tower connected). For this i set broadcast reciever
AIRPLANE_MODE (turns off) and BOOT_COMPLETE, when these two get fired i will loop for a while until Network is detected. But aside from this the phone might be in a location where

Cell Tower is simply not available

how can i detect such a situation?

  • 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-14T20:18:23+00:00Added an answer on June 14, 2026 at 8:18 pm

    You can use a BroadcastReceiver set up with an intent filter for “android.net.conn.CONNECTIVITY_CHANGE”

    <receiver android:name=".ConnectivityActionReceiver">
        <intent-filter>
            <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
        </intent-filter>
    </receiver>
    

    In that receiver, you can look at the intent’s extras to figure out if you have a connection or not. I do it as follows:

    @Override
    public void onReceive( Context context, Intent intent )
    {
        Intent startIntent;
        SharedPreferences prefs;
        String action;
        int updateType;
    
        action = intent.getAction();
        if ( !action.equals( ConnectivityManager.CONNECTIVITY_ACTION ) )
            return;
    
        /* If we don't have a connection, nothing to do */
        if ( intent.getBooleanExtra( ConnectivityManager.EXTRA_NO_CONNECTIVITY, false ) )
            return;
    

    If that second if check is true that means there’s no network connection, so the receiver exits. Next time there’s a connectivity change, the receiver is activated again and runs this check again. Once it passes the check, then I proceed to do whatever I do.

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

Sidebar

Related Questions

I need to detect where the user has just clicked from - as my
I need to detect a procedure from a click event has finished without delaying
I need to detect (in jquery) if a marker: <div id=marker></div> has been reached/hit
I need to detect if the phone has a front facing camera, and if
I need to detect character encoding in HTTP responses. To do this I look
I need to detect if a request cookie - value is different from a
I need to detect if an object is transient..if it is not I want
I need to detect if a post contains a specific category from a JSONP
I need to detect whether the user has pressed the dot key in the
I need to detect if the browser is Android (only from 1 to version

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.