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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:28:12+00:00 2026-06-17T10:28:12+00:00

I am working on an app that uses location. When starting the app, it

  • 0

I am working on an app that uses location.

When starting the app, it verifies if Wireless location is active. If not, a dialog box appears with a button that starts the Intent, Settings.ACTION_SECURITY_SETTINGS to show up the location settings.

I would like to make that task simple for my users and hide unnecessary settings that might make them choose the wrong setting and get the same dialog again.

This application don’t need GPS precision. In some cases, the smartphone may be unable to find GPS signal, or it could take a long time to track location, preventing my application to show results in time, making “Wireless networks” a better option to get location.

Here is some code that I use to test if “Wireless networks” is active and open the settings:

private void checkLocationEnabled() {
    String provider = Settings.Secure.getString(getContentResolver(), 
                                     Settings.Secure.LOCATION_PROVIDERS_ALLOWED);
    if (provider == null || !provider.contains("network")) {
        // Wireless location not enabled
        showDialog();           
    }
}

private void showDialog(){
    AlertDialog.Builder builder = new AlertDialog.Builder(this);
    builder.setMessage("No network location. Please, activate this setting in "
                            + "Location And Security")
           .setCancelable(false)
           .setPositiveButton("Settings", new DialogInterface.OnClickListener() {
               public void onClick(DialogInterface dialog, int id) {
                   Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
                   startActivity(intent);                           
               }
           })
           .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
               public void onClick(DialogInterface dialog, int id) {
                   MainActivity.this.finish();
               }
           });
    Dialog dialog = builder.create();
}

How can I filter Settings.ACTION_SECURITY_SETTINGS to show only the Wireless Networks option and remove GPS and all the remaining options in that Intent?

  • 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-17T10:28:13+00:00Added an answer on June 17, 2026 at 10:28 am

    How can I filter “Settings.ACTION_SECURITY_SETTINGS” to show only the “Wireless Networks” option and remove GPS and all the remaining options in that “Intent”?

    You build your own version of Android that supports this and distribute it in the form of a ROM mod.

    Otherwise, you can’t.

    AFAIK, that screen does not even have the capability of hiding those things, let alone exposing that capability to third parties via Intent extras or the like. Moreover, since there are dozens, if not hundreds, of implementations of the Settings app (device manufacturers change this app very frequently), even if this were possible on a few devices, it is unlikely that it would be possible on the rest.

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

Sidebar

Related Questions

Hi im working on an app that uses GPS location. My testing devices are
I'm working on the app that uses CoreData. There is location entity that holds
I am working on an app that uses location services. If I am debugging,
I am working on an app that uses a custom file type, I've figured
I'm working on a Node app that uses Express and SocketIO. I want to
I'm working on a small app that uses the Facebook API. What I want
I am working with a fairly old web app that uses MySQL as the
I'm working on an iOS app that uses a NSMutableURLRequest and a NSURLConnection to
I am working on a Java app that uses Spring IoC and JDBC Template
I've been working on a rails app that uses the restful authentication plugin. It

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.