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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:46:19+00:00 2026-05-27T01:46:19+00:00

I wanted to use the StatusBarManagerService, but it’s not available on the SDK, so

  • 0

I wanted to use the StatusBarManagerService, but it’s not available on the SDK, so I tried “cheating”, using reflection to access it.

I was able to access it, but now it’s giving me an error when accessing one of its methods:

java.lang.SecurityException: StatusBarManagerService: Neither user 10139 nor current process has android.permission.STATUS_BAR_SERVICE.

Is it possible to be granted this permission, or is it simply not possible?

This is my code:

    try {
        Class serviceManagerClass = Class.forName("android.os.ServiceManager");
        Method getService = serviceManagerClass.getMethod("getService", String.class);
        IBinder retbinder = (IBinder) getService.invoke(serviceManagerClass, "statusbar");
        Class statusBarClass = Class.forName(retbinder.getInterfaceDescriptor());
        Object statusBarObject = statusBarClass.getClasses()[0].getMethod("asInterface", IBinder.class).invoke(null, new Object[] { retbinder });
        Method clearAll = statusBarClass.getMethod("onClearAllNotifications");
        clearAll.setAccessible(true);
        clearAll.invoke(statusBarObject);
    } catch (ClassNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (SecurityException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (NoSuchMethodException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IllegalArgumentException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IllegalAccessException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (InvocationTargetException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (RemoteException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

And this is what I added in the AndroidManifest:

  <uses-permission android:name="android.permission.STATUS_BAR_SERVICE" />

Is it possible to be granted this permission, or is it simply not possible?

  • 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-27T01:46:20+00:00Added an answer on May 27, 2026 at 1:46 am

    From the platform AndroidManifest.xml:

    <!-- Allows an application to be the status bar.  Currently used only by SystemUI.apk
    @hide -->
    <permission android:name="android.permission.STATUS_BAR_SERVICE"
        android:label="@string/permlab_statusBarService"
        android:description="@string/permdesc_statusBarService"
        android:protectionLevel="signature" />
    

    Notice the protectionLevel attribute, with a value of signature this means that only applications signed with the platform signature and thus part of the device’s ROM can be granted access to this permission. You cannot obtain this permission from a self-signed application utilizing the SDK.

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

Sidebar

Related Questions

I thought I wanted to use GSS-API, but now am not so sure, since
I wanted to use RavenDB as back-end for my website . but right now
I wanted to use express with my node.js but now it says that my
I wanted use MVC and renderpartial to generate a menu but but could not
I wanted to use jFlex. Tried to search online tutorials. But all points to
I wanted to use HTML5 localStorage in IE9 but it does not support local
I wanted to use an ExpandableListView for my Fragment but since it's not native,
I wanted to use 6 different textures on a cube, one per side, but
I wanted to use winreg module of python for working with windows registry. But
I wanted to use full width stripe on my footer, but aparently it doesen't

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.