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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:55:33+00:00 2026-06-12T05:55:33+00:00

I created a BroadcastReceiver that listens for a CONNECTIVITY_CHANGE event. For now, I simply

  • 0

I created a BroadcastReceiver that listens for a CONNECTIVITY_CHANGE event. For now, I simply print out the action of the Intent that calls the BroadcastReceiver and its extras. I’m using a test phone in our office here in Manila and the SIM card is from Denmark. When onReceive() is invoked, this is what gets printed out in LogCat:

action: android.net.conn.CONNECTIVITY_CHANGE
key: extraInfo, value: data.tre.dk
key: htcCurrentActiveNetwork, value: null
key: networkInfo, value: null
key: reason, value: roamingOn
key: noConnectivity, value: null
key: inetCondition, value: null

I need to know what the value of reason is when the roaming goes off–could be roamingOff by guessing, but I can’t know for sure, unless I go to Denmark. This is because I need to perform a task when the roaming service gets turned off, and I noticed from LogCat that the CONNECTIVITY_CHANGE event is fired for reasons other than toggling the roaming modes. Or is there a better way of detecting when roaming is turned off?

Code for the broadcast receiver:

public void onReceive(Context context, Intent intent) {
    Log.d(This.LOGTAG, "action: " + intent.getAction());
    Bundle extras = intent.getExtras();
    for (String key : extras.keySet()) {
        Log.d(This.LOGTAG, "key: " + key + ", value: " + extras.getString(key));
    }
}

Manifest entry:

<receiver android:name=".listener.RoamingListener">
    <intent-filter>
        <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
    </intent-filter>
</receiver>
  • 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-12T05:55:35+00:00Added an answer on June 12, 2026 at 5:55 am

    There’s a difference between network roaming and data roaming.

    Generally, network roaming is allowing your telco to go through third-party satellites while you’re outside the country so you can stay connected to their services. Even if you already told your telco that you want to subscribe to network roaming, it will NOT be activated until you actually begin connecting via third-party telco satellites, and that only happens when you’re actually out of the country.

    Data roaming is simply allowing/disallowing your device to consume mobile data while you are in network roaming mode. It’s more device-dependent and you can easily turn it on or off in the phone’s Settings app.

    In short, if you want to detect network roaming, use TelephonyManager.isNetworkRoaming(). If you want to check whether data roaming is turned on or off, use Settings.Secure.getInt(getContentResolver(), Settings.Secure.DATA_ROAMING).

    IMPORTANT: I haven’t personally tested the following scenarios and I’m not sure what value isNetworkRoaming() will return.

    1. You didn’t tell your home telco to turn network roaming on, but when you arrived at some other country, the phone began detecting other telco networks.
    2. After scenario 1, your phone asks you to choose which of the detected telco networks to connect to. You choose one and the phone attempts to connect. I don’t know what value isNetworkRoaming() will return here because you didn’t subscribe to network roaming in the first place.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to create a broadcastreceiver which listens for android.intent.action.MEDIA_BUTTON, and get the extra_key_event
Hello, Im working on a solution for Android that will record calls (both out
I created a BroadcastReceiver and configured it with an android.provider.Telephony.SMS_RECEIVED action filter so it
I have a BroadcastReceiver that listen for the SMS_SENT Intent after an SMS has
I need to create a BroadcastReceiver that listens for when the the phone receives
Created an OpenGraph action and object. Trying to submit my action. When I click
I have a receiver that listens for headset MEDIA_PAUSE_PLAY and for AUDIO_BECOMING_NOISY they work
I have created a BroadcastReceiver for BluetoothDevice.ACTION_FOUND in a Service to scan and Log
Created BroadcastReceiver which displays application name and version number on install/ uninstall of any
I am using this code to create a BroadcastReceiver that has to run even

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.