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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:06:45+00:00 2026-05-15T16:06:45+00:00

Using my new Android phone established a small problem: I’m living in country A

  • 0

Using my new Android phone established a small problem: I’m living in country A but my mobile provider is from country B, because it’s just cheaper. Concerning mobile phone tarifs my country isn’t a foreign country for country B. However I have to enable data roaming in my Android phone. The problem is, I’m also quite often in country C and every time I have to switch off data roaming.

So I thought about writing a small app which disables data roaming if I’m not in country A or B and enables it otherwise.

My first try was to define the location using GPS, but this is rather useless, because I would have to calculate for every coordinate if it is in the allowed range. So I think the better solution would by to read from the phone the current provider and if this provider isn’t in the whitelist (which is defined by me), data roaming is switched off.

Do you know any other approaches? And how could I get the name of the current provider? And how to programatically disable data roaming?

  • 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-05-15T16:06:46+00:00Added an answer on May 15, 2026 at 4:06 pm

    You could use TelephonyManager:

    TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
    

    Some of its methods that might be useful for your case:

    tm.getNetworkCountryIso();
    tm.getNetworkOperator();
    tm.getNetworkOperatorName();
    tm.getSimCountryIso();
    tm.getSimOperator();
    tm.getSimOperatorName();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Android development and facing a problem while using AndEngine. I
I'd like to hack on my new Android phone using a Linux development environment.
i am creating a new android application.i am using the table layout. I have
I am new in android and i print log-cat using: Log.w(Tag, String text); and
I am new in android, I am using jackson-all-1.9.4 jar in my application for
I'm trying to share some text using an intent: Intent i = new Intent(android.content.Intent.ACTION_SEND);
New at using admob within Android. Is it possible to show ads with certain
How to access google calendar with new api on android ? Using GData APIs
I am new to the opengl so i am using guide of the android
I'm quite new to Android programming but familiar with C/C++ and Linux enough to

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.