Toggle the notification bar in android -
I know that I can extend the notification bar by reflection class & Lt ;? & Gt; Situation Manager = Class. ForName ("android.app.StatusBarManager"); Method shows; If (Build.VERSION.SDK_INT> = 17) {showb = statusbarManager.getMethod ("Detailed NotificationPanel"); } And {showb = statusbarManager.getMethod ("extension"); } Showb.invoke (getSystemService ("statusbar")); However, is there any way to expand it, if it collapses, and it has already been expanded, then erased it? The toggle function for status management is Android Docs, but it does not work for me. Edit I am calling this function from within a bound service. I think you may have the necessary permissions disappearing. Make sure you have EXPAND_STATUS_BAR permission in your Manifest.xml: & lt; Usage-permission Android: name = "android.permission.EXPAND_STATUS_BAR" /> Look around, I found this code: object sbservice = getSystemServ...