Fullscreen Android app for use in ROM - android

I'm developing an Android tablet app where I need to show fullscreen content. Entering and closing the app is done using a dedicated physical button on the device. When the button is pressed I want all other traces of the Android UI to disappear, and then reappear when we press the button again. I.e., a fullscreen app that is placed on top everything else.
Any ideas on how to achieve this? I've tried various approaches to no avail:
* Adding SYSTEM_UI_FLAGS* doesn't work for this purpose, as the SystemUI will reappear when touching the screen. Ideally we would also not like the animation when opening our fullscreen app.
* Adding a separate layer on top of what we believe is all other layers, but the SystemUI is still shown
Some kind of layering must be preserved. I.e., I need to show incoming call dialogs on top of the fullscreen app.
Please note: This question is about development in the framework/system part of Android. I'm not looking for answers on how to do it in regular user apps.

Related

Android - How to make an app displayed in a small screen while the rest of screen is still visible and clickable

I have a request to reduce my app screen size and the rest of the screen space are still visible and clickable for user.
It means when my app is running, user can click some icons or buttons outside of my application.
What I found are using such as Dialogs or Multiple Fragments. However, those solutions are useful when all are in your main activity. But in my case, the rest of the screen is from Home screen or other screens, not from my app screen.
Could someone have an idea for this kind of concept?
Here is my request concept image
Searching from internet
You don't need to do anything for this. Android supports splitt screen since Android 7.0.
Alternatively you can enable Picture-In-Picture mode for your app which is supported since Android 8.

Android app on Chrome using ARC, keep back button on top enabled

developer.chrome.com/apps/getstarted_arc#bestpractices
The ARC allows you to execute native android apps through the chrome browser by wrapping a chrome app around it.(As far as I can tell)
I am re-factoring an Android app to work well on Chrome. The first thing I need to do is to make the back arrow enabled at all times on the top left as shown below.
This is the program that allows Native android apps to run through chrome. I think the answer to my question lies somewhere in "Additional Metadata", or in the source code?
Add {"disableAutoBackButton": "true"} to the metadata. That will enable the back button within an activity. I've found that with my app that has multiple activities, though, it doesn't work to return to my main activity from my settings activity. It could be that I'm doing something wrong with the way I'm handling activities, I guess, but it works on all physical devices.
{"sleepOnBlur":false,"disableAutoBackButton":true}
please supply the above metadata before you download the zip or launch app from the arc welder
the first param prevents excessive pause/resume and also supposed to fix short black screen flash occurring occassionally in some of the apps.
the second params adds persistance back button on top left hence helping to avoid extra code required because of absence of back button in some screens(mostly the first screen)

Disable Home Button or system bar on tablet

I'm working on an existing Android application for medical purposes.
The back button and home button should be disabled.
With the existing code, the back button is disabled.
For disabling the home button they used onAttachedWindow with LayoutParams TYPE KEYGUARD,
but this security hole is fixed since 4.0.
I tried a lot of similar questions, but none worked out for me.
What is the way to get this done these days?
Also, hiding the status bar on tablet (where the home & back button live) would do the trick,
so any suggestions there are equally helpful!
Update: also, free third party apps that do the hiding trick are okay!
This sounds like a kiosk or dedicated use kinda thing, yes? You want your app to "own" the tablet and prevent other usage? I did this for an app whose sole purpose was to act as a remote control for a custom device. Basically I created two apps, a "custom launcher" app and the app that did the remote control. It's probably possible to integrate the two, but I wanted to support both dedicated and non-dedicated use. Note that I gave the launcher app a password-protected way to access settings so that I could recover the tablet at any time.
You can find a number of tutorials that will guide you through creating a custom launcher, just strip out all the stuff that makes it a generic launcher and replace it with an image button or similar that launches the actual app, or replace the launcher activity with your main app activity. Warning: I never figured out how to remove the launcher except by going into the settings.
As for hiding the system bar (notifications and status icons at the top of the screen), you'll want to use a full-screen theme like #android:style/Theme.NoTitleBar.Fullscreen.
As for hiding the home button I took this approach:
View main_layout = this.findViewById(android.R.id.content).getRootView();
main_layout.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
Unfortunately the STATUS_BAR_HIDDEN flag is deprecated now, but I think some of the other options would have the same effect. Regardless, the best you can achieve within Android's intended use is to temporarily hide the navigation buttons (home and back). A tap on the screen will bring them back.

Android how to make an activity fullscreen without home button

Some games that I play are full screen without the back and home soft buttons. You have to swipe down to get the buttons to show. How do I implement that in an activity? I figured out how to make it fullscreen, but all it does is get rid of the task & notification bar. The nav buttons were still there. I am using several different devices, so if it matters what OS version is needed, I would appreciate that information too.

i want to move an dialog of an external app to top of the tablet

Another app pop up a dialog in the center of my tablet suddenly and make my app not visible. Is there any way I can send any kind of api (like what we do in Windows ) to move (and also resize) it to the edges of the tablet but not close it?
And is it possible to close it also?
Thanks
Since you are using your Application and suddenly, you gets a popup on top of it which is being called from a different application. Basically, there is no way an application can interrupt another until there is permissions provided to the concerned Application.
However, You can check the logs and accordingly you can write a piece of code to dismiss any popup that appears on the screen, but for resizing an popup, I am not sure how to handle the UI.
Thanks!

Categories

Resources