Is it possible to have two active applications in android?

后端 未结 2 1902
一生所求
一生所求 2021-01-15 12:59

In Android , Is it possible to display one application(rendering Video) as a floating screen in one half of the screen. and at the same time interacting with another applica

2条回答
  •  甜味超标
    2021-01-15 13:29

    If by "two active applications" then you mean real applications (i.e. with activities, back stack, &c) active at the same time, then no (except in some specialized devices, with custom APIs).

    However, there is a trick you can use to achieve a similar effect. Applications with the android.permission.SYSTEM_ALERT_WINDOW (displayed as "draw over other apps" in Play Store) can create windows from a service and show them. So you could probably get the effect you want with this method.

    There is an open source library called StandOut which provides this behavior in an easy to use manner. You might want to take a look at it.

提交回复
热议问题