Beginner android, a few days when doing the notification, found in the notification to the status bar, setting allows notice, to notice, want to ask you, how to code, directly set to allow notice! Bosses, please give directions!
CodePudding user response:
Can't
CodePudding user response:
reference 1st floor ink_s response: not but I download several APP, I found that the APP is already allowed to inform CodePudding user response:
I don't know work Want to inform the operation of the status bar through the code is as follows: 1, in AndroidManifes. Add permissions in the XML file: 2, the acquisition system service 3, using the reflection method calls to expand Specific code is as follows: The Object of service=getSystemService (" statusbar "); If (service!=null) { Method expand=service. GetClass (). GetMethod (" expand "); Expand. Invoke (service); } } the catch (Exception e) { } CodePudding user response:
The reference 3 floor ink_s response: I don't know work Want to inform the operation of the status bar through the code is as follows: 1, in AndroidManifes. Add permissions in the XML file: 2, the acquisition system service 3, using the reflection method calls to expand Specific code is as follows: The Object of service=getSystemService (" statusbar "); If (service!=null) { Method expand=service. GetClass (). GetMethod (" expand "); Expand. Invoke (service); } } the catch (Exception e) { } ok I try again