Android dev - launching another app in full screen - android

I'm developing a launcher app that starts another 3rd-party app, and want to launch that app in full screen mode i.e. no status bar and no navigation/system bar (with all the soft buttons - back, home etc.). I am launching a 3rd party app so I can't modify its code/manifest to start the activity in full screen.
I know there is a way to do it with Immersive Full-Screen Mode in Android 4.4, but I have Nexus 7 tablets with Android 4.2.1.
Also, devices cannot be rooted.

As you said: I am launching a 3rd party app so I can't modify its code/manifest to start the activity in full screen. Only the developer of the app you want to make full screen can make this happen due to the fact that apps can't overwrite other apps' code unless you have full access to all the code for both apps.

Related

Auto-start chrome home-screen app (open to rooting options)

I have a Chrome Home-screen app on my Pixel-C tablet (where I have clicked 'Add to Home Screen' from Chrome Android).
Is it possible to root the Android tablet so that it automatically runs this web app in full screen mode on start-up without any user interaction being necessary? Very much like a Kiosk app, where the user should only be able to interact with the app itself (not the OS).
So far, I have tried using the Android Auto Start app, although it cannot detect Chrome Home-screen apps. My current setup is using the 'Immersive Mode' app to remove the navigation and status bar controls and then opening the kiosk style app manually.
I am open to any suggestions -- including rooting the device, which is probably necessary given the amount of control required.
You have to crate a custom launcher(Google "creating android custom launcher" for more such examples). Launcher is the home screen interface which user interacts to. In your custom launcher, you can restrict what app icons to show and what not to. You can choose this to be your only app and open it on boot and even relaunch when tried to exit.

Custom Launcher is not remaining as default launcher in Huawei device

I have developed a custom launcher/homescreen and it has been working perfectly on all android version for nearly two years. So far this launcher has been used in various Samsung devices.
Currently I am testing it in new huawei lua-u22 device. My launcher runs, can be set as default and shows up other apps on top of launcher too. But if I run another app (for example Gmail), screen lock(Swipe only) for 20-30 second, unlock device then press back button then instead of bringing it back to my launcher it goes back to default huawei homescreen. I checked by going to the settings-> home and there my launcher was still set as default. It only brings back my launcher home screen when I press home button again.
Is this problem of huawei device that is always redrawing default huwaei home as homescreen? Is there anyway I can track default selected home change at any time?
I found out the reason. In huawei after screen is tuned off my app was getting killed.
Huawei has a feature Protected Apps which allows application that is enabled in the list to keep running when screen is turned off. After I allowed my app in Protected apps it was not getting killed after screen turned off and everything now working properly.
To enable this feature go to System settings (which you can either find in the quick toggles portion of the notification shade by pulling down the status bar on the top portion of the screen). Go to All tab, Scroll down to Privacy and Security section, go to to Protected Apps and enable your app(this will control what’s allowed to run when the screen is off and what isn’t)
In stackoverflow there are few codes available to run this screen pro-grammatically which I do not find reliable enough as it may change in any new version of device.

How do Android Launchers start Chrome in Full Screen (WebApp) mode?

I've got a sticky situation. I'm developing a kiosk-style tablet application on JellyBean, and we're stuck with JellyBean.
We don't install a standard launcher on our Android tablets, and instead supply our own Home Screen/Launcher app, so that our application starts on system startup.
We were using a WebView for our GUI app. The WebView that comes with JellyBean is buggy and deficient in many ways, so our app doesn't work correctly in the WebView.
However, Chrome runs our app perfectly, so we want to switch to using Chrome, which we would launch from our own Home Screen application on startup.
We need to start it in full-screen mode, just like Launchers do when they launch any app/URL via a link that was placed on the Desktop.
I can't for the life of me find out how launchers pull this off.
I've tried adding --app="xxx", and/or --start-fullscreen to the /data/local/chrome-command-line file, but all to no avail. The additions options show up on the "chrome://version" screen in Chrome, but they have no effect.
Does anyone have any clue how they manage to launch Chrome in full-screen mode?
These tablets are all rooted tablets, completely under our own control, so no solution is out of bounds.
Thanks for any help!

Is it possible to programmatically lock the screen in Lollipop

I am building an app that will be in kiosk mode and must be over the lock screen its is possible using:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
However, I now need to programmatically lock the screen when the app is starting, looking at this link, I see it needs administrator privileges that are a bit more complicated on the lollipop version, has anyone managed that?
For your need, you can use the Screen Pinning. It's a new functionnality added in Android 5 to limit the application a task.
Programmatically, you can use Activity.startLockTask() and Activity.stopLockTask() to pin/unpin the application.
Some things to know :
If your application is not an Admin app, a popup will appear and you'll have to manually confirm the pinning mode.
No notifications will be shown in this mode.
The Home and Recent Apps buttons will have no effects.
you can unpin the application with no confirmation, and if you have set a Keyguard screen, you'll need to unlock it to go back to your Home application.

How to make Android application run in full screen mode?

I'm developing an application on Android, 4.2 (Jellybean) for a tablet.
When the application runs on emulator, it normally contains the top and bottom ribbon/bar where it shows the battery and signal (in top ribbon) and 'back' icon and etc. (in bottom ribbon).
Question is, how am I going to make the application run in full screen where users are not allowed to navigate out of the application? In other words, I want to make the application full screen and also lock it on my application only.
FYI, I'm using Master detail flow for representing my items to users.
Cheers.

Categories

Resources