hiding GPS notification icon from the status bar
i need to hide the GPS icon from the status bar when my service uses it. I've been making some research and found that it's not possible programatically.
but i found that it is possible if my开发者_开发问答 phone is rooted by installing something on the memory card. anyone can help with the root thing and if it is possible, can it be done programatically without going through the root thing.
thx a lot :D
No, it's not possible to do it with the public API.
Yes, you will need a rooted phone, but that's not enough. You will need to modify services.jar (and perhaps framework.jar also) in order to check whether your service is working or not.
Alternatively, as suggested by Someone Somewhere, you can hide the status bar altogether.
As a side note after the comment below, I would not set up the service to run all the time as it seems you're planning to do. Instead, I would register a BroadcastReceiver to read the SMS and start an Intent upon reception of a specific message. You could hide the status bar in that moment. See this for more details: Can we delete an SMS in Android before it reaches the inbox?
精彩评论