Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by sascha_be · Jul 21, 2014 at 05:50 PM · android

Android status bar hides icons?

I am making a simple app using Unity and I would like to display the status bar. I enabled to show it in the player setting for Android as I am currently testing Android only.

However when testing the app, some of the icons disappear. And I would like for it to be the same as always, specially for icons showing your connection status for WiFi and 3G service.

View when not running my app: alt text

View when running my app: alt text

When I swipe down the status bar, the icons appear again, but when I swipe it back up (while still being in my app), the fade out again.

Any ideas on how to let the status bar show all icons as normal?

status_normal.png (6.8 kB)
status_hidden.png (3.9 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by sascha_be · Aug 04, 2014 at 11:52 PM

I was not focused on the issue for some time but I did some new research today and I have found some answers. So I'll just answer it here to potentially help others stumbling upon this

First of, this is caused by passing the flag SYSTEM_UI_FLAG_LOW_PROFILE to setSystemUiVisibility(int) on Android, on Android API 11 and above.

See: setSystemUiVisibility SYSTEM_UI_FLAG_LOW_PROFILE

Since Unity 4, this is set when full screen regardless of you enabling or disabling the status bar

See: Unity docs: Screen.SetResolution

So The fix I did for now was just setting the resolution on Android passing false for fullscreen. It looks exactly the same but Unity internally doesn't set that flag to the Android UI system, leaving all icons visible. Code I used:

 Screen.SetResolution(Screen.width, Screen.height, false);

I also found the following link to call that Android function manually with own flags if you want, but I didn't try that myself: Unity forums: calling setSystemUiVisibility from Unity

Hope this helps someone out there :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image latorril · Sep 21, 2015 at 07:45 AM 0
Share

thank you so much!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

OS Status Bar and Rotation on Android 0 Answers

Preventing Android Status Bar activation on swipe? 0 Answers

Assets/scripts/fbLogin.cs(60,52): error CS1501: No overload for method `API' takes `3' arguments 1 Answer

How do I get Unity to increase the amount of memory passed on the command line to the jvm when making a build for Android? 5 Answers

running well in unity but error while building for android 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges