hiding GPS notification icon from the status bar - android

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?

Related

android. how to track on/off the phone?

I want track when going inclusion/shutdown(one from two) the telephone.
Probably, I must use BroadcastReceiver. I found action for intent - ACTION_SHUTDOWN.
http://developer.android.com/reference/android/content/Intent.html#ACTION_SHUTDOWN
But, I am not sure that is will be work when I remove my battery from device. Are there action for inclusion device?
I am not want to use Service...

How to show status bar icon for the Alarm set

I am developing a little Alarm clock application for my own purposes.
What I want to know is how to tell the system that an alarm is set in order to show the alarm icon on the RIGHT side of the status bar (where battery, signal etc. are).
I found a way to put the time of my next alarm by writing it to system settings, though it might not be a good way. But I can't figure out how to get this icon.
There are posts on this saying it's impossible, but there actually are apps on the PlayStore that do it.
Thanks in advance!

Status Bar When Screen is Locked android

I am starting activity with application context when screen is locked. However Status bar is not usable, doesnt get dropped down. Is there any way to make status bar and notifications usable when screen is locked ? (ICS-Android)
No, this cannot be done. This is a security feature of android, if the notification bar could pulled down while the user has the device locked, then it opens the user to security issues as personal information may be in the notification bar such as missed calls, text messages and emails etc.
Well.. GravityBox has an option to allow this.
However I'd be interested on what file you'd have to mod inside the SystemUI/res folder in order to make it work without Gravitybox...

turn on/off gps without shownig icon in status bar

In my android application, I succeed with turning on/off gps dynamically whenever required. But I am struggling with hide the gps icon in status bar when turn on gps. How can I do it?
NOTE: I also succeed with hiding whole status bar by making full screen. But I want to hide only gps icon.
You cannot do this. The status bar icon is controlled by the system and it will not allow third party apps to hide it when GPS is on. This is for security reasons as well. Any rogue app could secretly perform malicious operations using the user's location without the user knowing about it if s/he has no indication that GPS is active.
Why would you hide GPS icon?
I think this is a bad idea, since users want to know whether their GPS is active or not.
This would allows applications to snoop users position without them being aware of that fact, which is NOT a good practise. And this is why your app requires a permission to access phone location.
if you have sdk source file, it's easy:
modify NotificationManagerService.java
in methed enqueueNotificationInternal, add a flag (db file or create a file in /data/) ,when the gps application try to send notification, block it(refer to the packagename).
but if you do not have one ....
sorry ,i don't know.
I too got same problem, means when I am asking for gps to give location updates then it will show that gps icon, so if you remove those updates calling like locationmanager.removeupdates(locationListener), then it will remove that gps icon in status bar

how to get sequence of user interaction with android device?

After many sites searched and googling,
I can't find anything for my problem.
I want to capture the sequence of user interactions on android device. Starting from when the device is powered ON. And one more thing is that I'm not talking about the user event on UI of any application. It's for whole device UI interactions. And if any tools are available then please let me know about it. I didn't get anything about this. Any help or suggestion is well appreciate.
This is not possible, except perhaps via modified firmware, for obvious security and privacy reasons.
I am not sure at what extent it will help you to achive your goal but the best way I know is that:
You need to implement Broadcastreceiver for every action like action android:name="android.intent.action.BOOT_COMPLETED" when your device starts, similarly you need to use all the action which will notify you in your receiver.
You can run a service where you can check which app is running for your record. For this you need to fetch installed app list.

Categories

Resources