Preventing SystemUI from automatically restarting - android

I am developing an app that requires that the SystemUI to be completely gone, no Navigation Bar and no Status Bar. Immersive Mode is not enough, since the Navigation Bar will still pop up if the user swipes up at the bottom of the screen.
After a lot of research, I have found some snippets that don't work anymore since they're from ~2011. What I have managed to do is kill the SystemUI through pkill -9 com.android.systemui but it restarts by itself a few seconds later. So the perfect solution seems to be to prevent the UI from restarting, then manually restarting it when needed. All of this just so the device doesn't need a reboot. Is that possible at all?
Another solution would be to "freeze" the SystemUI, in such a way that it does not respond to the user trying to pull the Navigation Bar back up, but I have found absolutely nothing on that matter.
Obviously, the device is rooted.
Thanks in advance.

Related

Android Studio Action Bar wont leave

A white bar covering some of the commands in android studio will not disappear, The only way to make it go away is turn off the application it self, but when I turn it back on it comes back, How do I get rid of the bar while still in studio?
For me, these kind of issues are normally (Any ghost dialog) solved by rebooting my computer..

Hide navigation bar on rooted android device

I have a custom rooted android tablet working on Android M version. We built a kiosk application and next step is removing navigation bar completely, while our application is working. Also, when administrator close our application, navigation bar should appear again.
Before asking this question, I researched on Internet and find a lot of people have this problem. However, answers to theirs question were generally, making application to work in full-screen mode or in immersive full-screen mode.
These answers didn't help me at all, because user still can fling on screen and navigation bar would show again. These solutions are probably the best that can be done with an unrooted device, but in my case I need a better solution and my device is rooted.
Also, I saw this answer link, but after using this command my desktop went black, and couldn't reboot android system again. Happily I have recovery USB so my device is working again. :)
I found another answer link, and like others, didn't help me because I need to reboot system after adding line of code (qemu.hw.mainkeys = 1). Also, solution that I looking for is fully dynamical and done by code.
I am really convinced that this isn't mission impossible, because we had old tablet (also rooted) with button in back, which can hide and show navigation bar without rebooting it.
Any help is appreciated.
I can't help you with your problem, but provide a little more information.
The company im working for is using devices in kiosk mode, but we have custom android devices from a hardware producer, which provides a custom HAL interface. We can set the kiosk mode via that interface.
My guess is it cant be done easily, if it was easy, we would have not gone that way. Hope it helps.

Is it safe to disable com.android.systemui?

I have found that Android recent app dialog can be disabled by disabling
package com.android.systemui. I want to run my (rooted) device in kiosk mode so it is essential that the recent apps dialog not be shown on long press.
Now, exactly what does com.android.systemui do? I don't need notifications and power indicators and stuff so it is OK if that kind of cosmetic stuff disappears. It is also OK if soft input home buttons disappear because I have replaced them with a software app (Button saviour).
Is it safe to disable com.android.systemui, or do I risk subtle system hangs in certain unclear situations? To put it shortly -is it just another app, or is it absolutely essential to the Android operating system? (I haven't experienced any problems this far!)
Is com.android.systemui available in all Android versions?
If you completely remove SystemUI.apk from the system, your device will hang on start-up and never fully boot again. Tried it before. ;) Framework-res and the system have some dependencies on SystemUI.
The correct, non-invasive way to get rid of SystemUI is to have an application that force-closes it upon BOOT_COMPLETED via am force-stop com.example.systemui or kill <PID>. Depending on device SystemUI restarts itself (not always), if it does you'll have to set a Timer that repeats the kill process. There's an app on Play store that does this, but I can't say for the reliability.
Hope this helps,
I have it disabled on my phone succesfully via removal; gone is the ugly top bar with the notifications and clock.
Drawbacks are that native screenshots won't work nor does the recent apps switcher, but both issues can be fixed via replacements.
Battery life increases slightly due to lower CPU usage.
(I9500 cyanogenmod 11)

disable android systemui button and other components are not showing

I am trying different options to disable system bar permanently for my android app. Now, the most successfully solution is stop the android systemui service.
service call activity 42 s16 com.android.systemui
But, this cause serious issues in my app. I have 3 android UI components on screen, 2 webviews and one videoView. Upon disabling the UI service, my webviews will show on screen for a second and then turn completely black(maybe disappeared). Only videoview is playing. Because I am refreshing the webview every 10seconds, the webview will shown up another second upon each refresh and gone. In addition, all my buttons are gone as well. Any suggestions? Thanks
How could you consider to stop system services?
You shouldn't mess with your users' devices!
Why didn't you just try to hide the Status bar and/or the Navigation Bar
Edit:
Another solution is to implement the Kiosk mode as in this tutorial or Screen pinning if devices are running Lollipop

Android disable notification bar [root]

I need to enable this on 4.2.2 android tablet.
I've successfull'y done that using this terminal command:
"settings put global device_provisioned 1"
The problem is, that this command also disables HOME button, so I cannot use it. Seems like system stops sending intents.
I've found ways to disable whole system bar at the top and bottom of the screen, but then I loose my navigation buttons.
I've tried disabling notifications one by one, but I still see searching for GPS and Android active hotspot icons in notification bar.
It seems I've tried everything I could, but am unable to get required functionality.
What else could I try?

Categories

Resources