Is it possible to “fold” Android applications?

I know that this is generally beyond the scope of SO, but I'm looking for some basic yes / no data to see if this is possible to continue ... I think of an annotation application that launches "other" installed Android applications. like a web browser.

In fact, while the user is browsing, my application will work in bg as a service, and then they can activate it, so that they can essentially intercept user inputs and translate them on a transparent canvas through a web browser into lines, forms, etc. Then the user can remove the on-screen mark of his marking with the base web page, which will be saved on the SD card.

+3
source share
2 answers

This is a very good idea and a big question, but, unfortunately, I do not think this is possible.

The way that Android is designed for only one Activitycan have focus at a time, and Servicecan work in the background, the user will not be able to interact with it. The user can only interact with the currently active Activity.

Again, love this idea, but it, unfortunately, is not supported.

+2
source

You may be able to achieve this with the WindowManager service . You can then use this for a call addView()with a type view TYPE_SYSTEM_ALERTor perhaps TYPE_SYSTEM_OVERLAY(but see the Notes in the documentation on entering the input focus).

, ( , , ), , , SYSTEM_ALERT_WINDOW.

0

Source: https://habr.com/ru/post/1761017/


All Articles