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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:47:07+00:00 2026-05-29T09:47:07+00:00

i want disable statusbar in activity, i have use below code, it happen SecurityException,

  • 0

i want disable statusbar in activity, i have use below code, it happen SecurityException,
StatusBarManagerService: Neither user 10049 nor current process has android.permission.STATUS_BAR. I have add <uses-permission android:name="android.permission.STATUS_BAR">, but it’s not works? Anyone know how to resolve this problem? Thanks

mStatusBar = getSystemService("statusbar");

if (mStatusBar != null){
    Log.v("statusbar", "get status bar service "+mStatusBar.getClass());
    Method[] arrayOfMethods;
    Method localMethod;
    arrayOfMethods = mStatusBar.getClass().getMethods();
    for (int i = 0; i < arrayOfMethods.length; i++){
        localMethod = arrayOfMethods[i];
        Log.v("statusbar", "find status bar method "+localMethod);
        if (localMethod.getName().equalsIgnoreCase("collapse")){
//                    mStatusBarCollapseMethod = localMethod;
            } else if (localMethod.getName().equals("disable")){
                try {
                    Log.v("statusbar", "invoke "+mStatusBar+"."+localMethod.getName()+"(1)");
                    localMethod.invoke(mStatusBar, 1);
                    Log.v("statusbar", "disable statusbar");
                } catch (Exception e) {
                    Log.v("statusbar", "disable statusbar excption:"+e.toString());
                    e.printStackTrace();
                }
            }
        }
    }
}
  • 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-29T09:47:08+00:00Added an answer on May 29, 2026 at 9:47 am

    IF you need to disable the status bar from your java code, then you can do this:

    Window win = getWindow();
    win.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to disable a textbox in the view. So I use following code:
I want to disable a hyperlink so that if user clicks on the link,
I want to disable viewstate for nearly all of my pages and I have
I want to disable the referenced control in the HTML and javascript below, yet
I want to disable a block in development and use it in deployment in
I want to disable the keyboard for an HTML SELECT tag so the user
i want to disable the map drag when user try to drag the map
I want to disable TabBar in GWT's TabPanel and prevent user from direct choosing
I want to disable button when user first click it so it must not
I want to disable the selection of certain rows in a datagridview. It must

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.