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

  • Home
  • SEARCH
  • 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 6787663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:23:35+00:00 2026-05-26T17:23:35+00:00

How can I program the Reset to default function from the APN menu in

  • 0

How can I program the “Reset to default” function from the APN menu in Android?
I used the code from http://blogs.msdn.com/b/zhengpei/archive/2009/10/13/managing-apn-data-in-google-android.aspx to create and set a custom APN. However, I would like to add functionality to my script to remove the custom entry from the APN list.
Is there a way to call the “Reset to default” function?
If not, how can I remove an APN?
Thanks.

  • 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-26T17:23:36+00:00Added an answer on May 26, 2026 at 5:23 pm

    If not, how can I remove an APN?

    If you know which entry to delete, use ContentResolver.delete()

    Here the URI will be : Uri APN_TABLE_URI = Uri.parse("content://telephony/carriers"); and Where will be a filter to apply to rows before deleting, formatted as an SQL WHERE clause (excluding the WHERE itself).

    Is there a way to call the “Reset to default” function?

    To restore to default you need backup the default APN ID in the first place. If you back it up, you can call SetDefaultAPN() to restore it.

    Try this out though, I saw it in TelephonyProvider.java. It seems risky so I suggest you back up your APN’s

    private void restoreDefaultAPN() {
            SQLiteDatabase db = mOpenHelper.getWritableDatabase();
    
            db.delete(CARRIERS_TABLE, null, null);
            setPreferredApnId((long)-1);
            ((DatabaseHelper) mOpenHelper).initDatabase(db);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a SQLite database on Android device. The program can read/write to database
How can I automatically run my C# program after hard-reset or soft-reset on Windows
Can you program/configure Visual Studio to produce custom intellisense for your own server controls.
What program can I use to decompile a class file? Will I actually get
Summary: Can I program a thick client game in C without reinventing wheels ,
my Python program can be launched with a range of different options (or subcommands)
Is there a way my program can determine when it's running on a Remote
I want to design a c# program which can run program a 3rd exe
I have program, that must interact with a console program before my program can
I've got a table recording views of programs. Each program can have two different

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.