0

For example, It's like more of a split screen mode. I want any app to be opened in a reduced activity size. It's like resizing the activity size as like we do the windows in pc. Is it possible in Android, how to do that programmatically ? While resizing the activity I want other parts of the screen to be useable. I have tried setting layoutparams in the windowmanager but that allows only my apps to be launched in reduced size but I want any apps to be launched in reduced size. Is that possible ?

ruben
  • 1,761
  • 4
  • 24
  • 47
  • "I want any app to be opened in a reduced activity size" -- what makes you think that the developers of those apps want that? – CommonsWare May 05 '21 at 13:18
  • I mean it's me who want to define a size that any activity should take in the screen. just resizing a window (activity in android) shouldn't be that difficult right? – ruben May 05 '21 at 13:21
  • "I mean it's me who want to define a size that any activity should take in the screen" -- yes, but you are trying to do that to the activities from other apps, if I understand your question correctly. Why do you think that the developers of the other apps want this? And, what makes you think that the platform wants to give arbitrary developers this level of control over other apps? I can think of some security problems that this could raise. – CommonsWare May 05 '21 at 13:41
  • Isn't it that other developers only care that their app runs in an activity? I don't want to control other apps or the platform to leak security holes. All I want is to customize the screen, so that it can run others app in a defined screen area while I can run my app in the remaining space. I have tried with a service to display a floating window on top of all activity. But still I want to limit the space any activity takes. Is it that doing this will conflict with how the OS is made or securities etc ? Can you please tell me how complex it can be, so I might focus on other alternatives? BR – ruben May 05 '21 at 14:02
  • 1
    "Is it that doing this will conflict with how the OS is made or securities etc ?" -- Android supports free-form multiwindow. This is enabled at the system level for the entire device, such as for Chrome OS. Apps cannot toggle this state. Android has limited support for picture-in-picture on other devices, but it does not seem to meet your requirements, such as forcing arbitrary apps into arbitrary windows. Of course, you are welcome to fork Android itself and try to enable what you seek at the OS level. – CommonsWare May 05 '21 at 14:13
  • free-form multiwindow seems cool! I just needed to open any apps in one of those multiwindow and keep running my app in another window while positioning them fixedly. Currently I need to tap on the app icon and select free form for it to go in free form. Isn't there a API to play with multiwindow mode so that it's possible to do programmatically. forking the Android OS could be challenging for my level. – ruben May 05 '21 at 14:38
  • 1
    "Isn't there a API to play with multiwindow mode so that it's possible to do programmatically" -- no, though I suppose I cannot rule out the possibility of some way of doing it on a rooted device. "forking the Android OS could be challenging for my level" -- buy a Chromebook. – CommonsWare May 05 '21 at 14:58
  • "buy a Chromebook" - could you please tell a bit more ? – ruben May 05 '21 at 15:15
  • Before you go forking Android to enable a feature, it would seem like seeing the feature in action might be a good idea. The primary environment that uses free-form multiwindow is Chrome OS. It is also used for some "desktop environment via an external monitor" solutions, such as Samsung DeX, though in those cases there may be more manufacturer-specific modifications in place. – CommonsWare May 05 '21 at 15:37
  • Actually was able to test in android mobile by enabling developer options, it says : https://www.androidpolice.com/2019/03/14/freeform-windows-can-be-enabled-in-android-q-without-hacks/ – ruben May 05 '21 at 15:42
  • Ah, yeah, I forgot about that toggle. I'm used to testing on hardware, so I haven't used that switch since it got introduced. Sorry! – CommonsWare May 05 '21 at 15:57
  • no problem! good to know the Chrome OS option and DeX – ruben May 05 '21 at 16:07

0 Answers0