Listner state navigation bar - Android Q&A, Help & Troubleshooting

I have an application closely associated with the system navigation bar. It is very important for me to know whether it is hidden or displayed.
The following code says it can tell whether immersive mode is enabled/off, which hides the navigation bar.
Code:
View decorView = getWindow().getDecorView();
decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
@Override
public void onSystemUiVisibilityChange(int visibility) {
if ((visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
Log.d("NavBar", String.valueOf("visible"));
} else {
Log.d("NavBar", String.valueOf("not visible"));
}
}
});
But he can not say if I gestured up from the bottom of the screen to the navigation bar, and after a while she disappeared again.
How do I make it so that I can track the visibility state?

Is there really no solution?

As far as I understand the docs ( https://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_HIDE_NAVIGATION ), they say that the SYSTEM_UI_FLAG_HIDE_NAVIGATION flag will be cleared as soon as the navigation bar reappears in immersive mode. (Means the "immersive mode" is "closed".) As far as I can see, your approach is ok for immersive mode but not for sticky mode:
Please read carefully the difference between immersive mode (SYSTEM_UI_FLAG_IMMERSIVE) and sticky mode (SYSTEM_UI_FLAG_IMMERSIVE_STICKY). To get full control over the appearance of the navigation bar, you need to use SYSTEM_UI_FLAG_IMMERSIVE and not SYSTEM_UI_FLAG_IMMERSIVE_STICKY. In immersive mode (SYSTEM_UI_FLAG_IMMERSIVE), you have to take care yourself that the navigation bar disappears again after some user interaction (usually running an async task that reenters immersive mode after xxx milliseconds of time). If the behavior is - like you describe it - that the navigation bar disappears again by itself, this indicates that you are using SYSTEM_UI_FLAG_IMMERSIVE_STICKY. In sticky mode, the docs say that flags are not changed at all because in this mode the short appearance of the nagivation bar is not considered a view change.
There are very good examples how this is done on the android dev pages. Read carefully: https://developer.android.com/training/system-ui/immersive.html

Yes, I understand what you are writing about, but in fact it's a little different. I do not put SYSTEM_UI_FLAG in my application, but any other program and even the system. In these all programs the developer can establish how he wants, and I need to know this in order to correctly implement my application.
o you understand what my program is about - here's the video. But there's another problem on video. Just a video so you can see what the application is about.
https://photos.app.goo.gl/riaFIDumxyV2cTWx1
Now I instead of decorView substituted View, on which I draw HUD. Now I can track when the navigation bar enters and exits this mode. And I can not handle the appearance after the gesture and reverse immersion.

Bascially, you listen to the change with your listener (your code snippet). To reenter immersive mode again, run an async task that is launched after the user's interaction (e.g. responding to a touch-event) and that re-enables immersive mode after xxx milliseconds.

I do the same. For this, I have a data stream from getevent. I process touch from the navigation bar (in particular also from the bar status, because there are different immersion modes and gesture on the status bar also returns the navigation bar) as a gesture that returns the bar. The gesture must be completed within 1 second, then it returns. In general, I use getevent to process touches from the navigation bar. The system does not intercept the pressing of the navigation bar.
Therefore, you need to use the low-level command getevent, root and busybox.
https://photos.app.goo.gl/ywu6T2XopaHxlAnx1 - video

Related

Hiding the Status bar for Android 4.0 tablets

I've tracked down why some apps don't changed the status bar for tablets running ICS. There was an API change where tablets now use a different method to dim the status bar. I already passed this along to the Plex team who have put it in their test build for their next release. If you have an app you'd like this put into please pass the following information along to the dev team:
Controls for system UI visibility
Since the early days of Android, the system has managed a UI component known as the status bar, which resides at the top of handset devices to deliver information such as the carrier signal, time, notifications, and so on. Android 3.0 added the system bar for tablet devices, which resides at the bottom of the screen to provide system navigation controls (Home, Back, and so forth) and also an interface for elements traditionally provided by the status bar. In Android 4.0, the system provides a new type of system UI called the navigation bar. You might consider the navigation bar a re-tuned version of the system bar designed for handsets—it provides navigation controls for devices that don’t have hardware counterparts for navigating the system, but it leaves out the system bar's notification UI and setting controls. As such, a device that provides the navigation bar also has the status bar at the top.
To this day, you can hide the status bar on handsets using the FLAG_FULLSCREEN flag. In Android 4.0, the APIs that control the system bar’s visibility have been updated to better reflect the behavior of both the system bar and navigation bar:
The SYSTEM_UI_FLAG_LOW_PROFILE flag replaces the STATUS_BAR_HIDDEN flag. When set, this flag enables “low profile" mode for the system bar or navigation bar. Navigation buttons dim and other elements in the system bar also hide. Enabling this is useful for creating more immersive games without distraction for the system navigation buttons.
The SYSTEM_UI_FLAG_VISIBLE flag replaces the STATUS_BAR_VISIBLE flag to request the system bar or navigation bar be visible.
The SYSTEM_UI_FLAG_HIDE_NAVIGATION is a new flag that requests the navigation bar hide completely. Be aware that this works only for the navigation bar used by some handsets (it does not hide the system bar on tablets). The navigation bar returns to view as soon as the system receives user input. As such, this mode is useful primarily for video playback or other cases in which the whole screen is needed but user input is not required.
You can set each of these flags for the system bar and navigation bar by calling setSystemUiVisibility() on any view in your activity. The window manager combines (OR-together) all flags from all views in your window and apply them to the system UI as long as your window has input focus. When your window loses input focus (the user navigates away from your app, or a dialog appears), your flags cease to have effect. Similarly, if you remove those views from the view hierarchy their flags no longer apply.
To synchronize other events in your activity with visibility changes to the system UI (for example, hide the action bar or other UI controls when the system UI hides), you should register a View.OnSystemUiVisibilityChangeListener to be notified when the visibility of the system bar or navigation bar changes.
See the OverscanActivity class for a demonstration of different system UI options.
from:
http://developer.android.com/sdk/android-4.0.html
Say I have an app running, how would I go home or back without the nav bar? We have no physical buttons or capacitive buttons...
Sure some apps let you quit from the app itself but others don't.
Are u saying you would like to have it duck outta the screen?
Modded by MBOK
It would be nice if it was sorta programed as it was on the GNex when in apps such as YouTube when viewing a video in full screen the buttons disappear (actually disappear not dim out) and when you touch the screen the buttons reappear.
mrokeefe said:
Say I have an app running, how would I go home or back without the nav bar? We have no physical buttons or capacitive buttons...
Sure some apps let you quit from the app itself but others don't.
Are u saying you would like to have it duck outta the screen?
Modded by MBOK
Click to expand...
Click to collapse
Button Savior.
mrokeefe said:
Say I have an app running, how would I go home or back without the nav bar? We have no physical buttons or capacitive buttons...
Sure some apps let you quit from the app itself but others don't.
Are u saying you would like to have it duck outta the screen?
Modded by MBOK
Click to expand...
Click to collapse
The buttons don't disappear, they dim; if you touch them they come back
If anything, I would love to have the app drawer button on the nav bar
Modded by MBOK
mrokeefe said:
If anything, I would love to have the app drawer button on the nav bar
Modded by MBOK
Click to expand...
Click to collapse
+1 here. im sure its a mod we'll se after bootloader. why must i reach to top right!?
+1
+1
Yep agree... this thing with menu top right and notifications bottom left is nuts. Buttons should be near the bottom where I hold it. Ideally the menu buttons (Inc app drawer) would be bottom right and notification top right.
Actually all devices have power button which can be used for getting back from fullscreen mode.
There is an issue on code.google (24546): hxxp://code.google.com/p/android/issues/detail?id=24546
I think it's pretty nice solution. Also there can be "hide" button on panel.

feature request: system wide gesture control

Love paranoid and the direction you are taking.
A feature that I belive many users would benefit from is gesture control when in immersive mode.
For example I am browsing on chrome in immersive mode and I want to access the quick setting tiles in order to change my connection from 3g to wifi. I pull my finger down from the top of the screen to show the notification bar and then repeat to open the quick settings shade. But what's this oh no I have closed the page I was browsing. (This can happen)
My solution to this is a gesture from the side of the screen dragging my finger in a downward arch with a flick at the end to bring down the shade.
Please bring this feature it will really assist with the usability of immersive mode.

[Feature Requests] More Hover Improvements

I have a few requests to improve the user experience with Hover:
1. After launching an app into floating mode, the user should be able to jump to full screen mode if they want. It would be very slick if this could be accomplished with a 'pinch out' gesture but a fullscreen button would also work.
2. Instead of having to long-press from the notification panel to launch an app in floating mode, there should be a button that automatically displays underneath of every notification that states 'reply' or 'floating' so that the user can access the app in floating mode more quickly.
3. When launching into floating mode from recents, the app that is currently running should remain fullscreen while the app that was selected in floating mode should appear over top of the current app. Right now, the app that is open and running before accessing the recents menu is closed completely after selecting an app to run in floating mode.
Thanks and I appreciate any and all feedback.

[Request] Swipe Floating Windows to Switch between Apps

this would be similar to Alt+Tab on a PC - except you'd swipe left and right on the floating window... maybe add a top bar to the floating window so as to not conflict with apps that require left/right swipe to open menus, and then swipe that top bar.
i think that'd make the floating window mode 10x more useful than it's current iteration where it's a one time, one way operation.
another related function would be from this advanced floating window mode, as you're cycling through apps, users could then swipe up or down to close that particular app, thus removing it from the cycle.

General SoulRom S23 Ultra from Chinese Website (VIP1) (Android 13 OneUi 5.1)

CP_S9180ZCU1AWBE.tar
drive.google.com
BL_S9180ZCU1AWBE.tar
drive.google.com
SM-S918X_S23U_Soul_VIP1线刷包.zip
drive.google.com
Extracted form Chinese Website..
Flash at your own risk..
I dont think giving a rom without any description of features and guide on how to flash will help
Mrxyzl said:
I dont think giving a rom without any description of features and guide on how to flash will help
Click to expand...
Click to collapse
Exactly, realy weird, by doing so like this
I have found information about the ROM. The website is: "SoulUI"
But there are differences to the Roms, there is an EU variant as well as a China variant. The question is which version the colleague has uploaded.
The link above will take you to the EU version.
What the VIP level means I do not really understand.
They support both the S23, S23+ and the S23 Ultra.
For those who have no translator in the browser...
Spoiler: About the SoulUI-Rom
Please recognize this Taobao store and keep it updated, and do not trust any other contact information.
I will not be responsible for any economic losses caused by contacting other people.
Supported models: ● S23 series European version (SM-S918B/SM-S916B/SM-S911B) models
Exchange group: 772862135
Download address (including flashing tools and tutorials): Link: https://pan.baidu.com/s/1hhVMkp3pZDkANMEn0ZdHmw Extraction code: 1314
S23/S23+/S23U_S91XX_VIP1
1. S23U is based on the latest Android 13, OneUI5.1 official S918BXXU1AWBD bottom package, S23+ official S916BXXU1AWBD bottom package, S23 official S911BXXU1AWBD bottom package production
2. Bank of China features, streamline a large number of useless APPs
3. Crack the signature Crack font restrictions
4. One-click installation with built-in LSP framework
5. Support NFC analog access control
6. Marquee (alarm, call, music playback)
7. Free definition of virtual button height (can be hidden, the system has a floating ball, and slide up gestures , edge gestures, support Bezier animation)
8. Icon themes, third-party icon packs can be used, front camera flash
9. Integrated system tools independently developed by Soul: Soul fine-tuning
10. Soul module supports one-click installation of xposed modules, automatic With mainstream functions (fingerprint payment, grab red envelopes, anti-withdrawal, motion acceleration, Alipay assistant, Douyin assistant, simulated positioning)
Soul fine-tuning function introduction:
[Connection]
WLAN status: display the ssid and password, IP and gateway of the connected
wifi
. Prohibit pop-up stk operator dialog box after booting Mobile network: modify mobile network type preference Network settings: modify mobile network frequency band preference 5G network mode: set SA, NSA mode Volte HD call: switch volte HD voice
[Sound and Vibration]
Full charge ringtone: set the full charge reminder sound
only once: full charge ringtone can only remind once
Voice announcement: voice announcement full charge reminder
Enable music spectrum: display spectrum information on the screen when playing music
Allow movement: allow Move the music spectrum position
Spectrum type: Set the music spectrum display style Sound decibel : Detect the sound decibels
of the current environment Time: Custom reminder time Text-to-speech engine: Set the default text-to-speech engine, the kernel Microsoft text-to-speech engine voice broadcast Incoming call: When there is an incoming call, the voice reads out the contact Voice ringtone alternately: use voice and ringtone to play from Definition format: Customize the format of the voice broadcast text content Power status voice broadcast: broadcast the battery status when the power is connected/disconnected Long press to read aloud: Long press the text to read aloud Voice broadcast text message: When a new text message comes, the voice reads out the text message The content is inserted into the earphone to broadcast: the content can only be read out when the earphone is inserted
[Notification]
Side screen flash management: Set the parameters of the side screen flash and the side screen flash application (marquee)
Front camera flash: Turn on the front camera flash function, which can be used as an LED notification light
. Notification Bright screen management: Allow specific application notifications Screen-on
voice broadcast notification: Allow specific applications to read out notification content Notification prompt management: Allow specific applications toast
to display notification content Flash blinks when there is an incoming call
[Status Bar]
Hide Status Bar Icon:
Customize the icon to be hidden in the Status Bar The lunar calendar is displayed under the date Signal on the left: Move the signal icon to the left Display the operator: Display the operator information on the right of the signal Custom operator: You can define the operator's text information Battery percentage Font size: Set the font size of the battery percentage Enable Soul battery Icon: You can replace the official power icon (dozens of icon styles are built in ROM) Status bar power icon: Choose the built-in power icon style Allows you to define the color of the power icon: After opening, the color does not change with the system Power icon color: Customize the power icon Coloring Hide Soul battery icon: Hide Soul battery icon in the status bar Battery icon size: Set the size of the soul battery icon Network speed: Set network speed display in the status bar Dual network speed display: Display upload and download network speed Network speed font: Set network speed Font size Custom text in the status bar: Set the custom text type in the status bar Date format: You can change the date format type when the defined text is a date. Position of the custom text: Set the display position of the custom text in the status bar Time display seconds: Set Status bar time display with seconds Status bar clock style: Set the position of the status bar time, the default soulrom is on the right, you can set the heel to the left Time text: Set the text type of the time band Date format: You can change the date when the time text is set to date format type Time text display position: Set the position where the time text is displayed Time text
size: Set the time text font size
Status bar left slide: Set the status bar left slide action gesture
Status bar right slide: Set the status bar right slide action gesture
status bar Long press : Set status bar long press action gesture
status bar double click: set status bar double click action gesture upper
left corner of status bar single click: set status bar upper left corner click action gesture
status bar upper left corner long press: set status bar upper left corner long press action gesture
Click on the upper right corner of the status bar: set the action gesture on the upper right corner of the status bar
Long press on the upper right corner of the status bar: set the long press action gesture on the upper right corner of the status bar
Linear power: display the linear power on the screen
Display position: set the display position of the linear power
Linear Width: Set the height of the linear power
Linear Width: Set the width of the linear power
Linear background color: Set the background color of the linear power
Linear foreground color: Set the color of the remaining power of the linear power
[Display]
Eye protection at night: You can set a lower brightness than the official one, and use it at night to protect your eyes
Blue light mode: Another mode for eye
protection Screen brightness: You can adjust the brightness value of eye protection
at night. Eye protection
Global dark mode: Force all apps to try the dark mode
Screen color: Switch the screen to black and white mode
Outdoor mode: Turn on a brighter brightness than the official one Suitable for outdoor
Animation speed: Fine-tune the animation speed of app transitions
Automatically shut down the screen: Settings Screen mode
: You can set Amoled cinema or Amoled photo mode
Global refresh rate: You can set 120hz or 96hz globally
Screen resolution: Customize screen resolution
Font management: Download and install your favorite fonts
[Home screen]
Icon theme: You can apply the third-party icon theme package downloaded by Kuan.
Custom icon: You can customize the icon of other unsuitable applications based on the third-party icon package.
Application name: You can customize the display of the application name
...
(You can find pictures on the website.)
If anyone is testing it, I'd love to hear more.
You have many informations on s22 ultra forum

Categories

Resources