In any log when the application Zyganote... I observe that a Handler jerking, then ApplicationThread and then to some Zyganote... (sort of). From this I concluded that when the application starts, the system creates a thread for it. And if an error occurs, then everything breaks down to the fatal end and the application flow twitches. It crashes. But it's not that

Suppose I want to somehow master one application, namely, to switch to one of its activities and press buttons / enter texts / scroll, etc. Is it possible If not, why not? How, then, some applications manage to show their view on top of everything, work even when they are closed.

Clean Master shows a circle on top of all other applications for "acceleration";) system.

UC Browser somehow even determines when the user is copying something and offers to search the selected text through itself. Moreover, it works perfectly everywhere.

Google Translator has the same functionality, only offers to translate the selected text.

Shazam can hear music automatically when he hears it.

What can I say, Google Now always listens to it and responds to "Ok Google"!

How is all this implemented?

And further. I don’t understand how the system works. Can you find out more about this? How do application and system applications work? Why can't some apps get some permissions? How does the system department responsible for storing minimized applications work?

Is the whole android built on apps and scripts? I would like to see a worthwhile answer.

    1 answer 1

    From this I concluded that when the application starts, the system creates a thread for it.

    Any running application has at least one thread (usually called main thread). No flow - no execution.

    Android creates a special process Zygote, which starts a virtual machine that already loads the process (earlier these were dex files, as now - you need to watch).

    Suppose I want to somehow master one application, namely, to switch to one of its activities and press buttons / enter texts / scroll, etc. Is it possible

    Yes and no. Normal applications cannot be directly influenced by others - they are run in a separate sandbox environment. But you can interact through the sending intend.

    To show your view on top of another it is not necessary to “master application”. You can simply display your window with the correct settings. The search keyword is permishn android.permission.SYSTEM_ALERT_WINDOW and, for example, this question https://stackoverflow.com/questions/20461979/how-to-overlay-views-in-other-apps

    work even when closed.

    the fact that you supposedly "close" the application does not mean that you close it. The application may well start the service and calmly live the battery, showing the window.

    UC Browser somehow even determines when the user is copying something and offers to search the selected text through itself. Moreover, it works perfectly everywhere.

    The android has a special api which can intercept clipboard changes https://stackoverflow.com/questions/11500349/android-implement-broadcast-receiver-for-clipboardmanager

    What can I say, Google Now always listens to it

    Some applications have special privileges :)

    And further. I don’t understand how the system works. Can you find out more about this? How do application and system applications work? Why can't some apps get some permissions? How does the system department responsible for storing minimized applications work?

    here to paint on several books. And the system is simple - at the bottom of the Linux kernel, on top of it is the system for launching Android applications and various other things for servicing the camera, microphone, speaker, and the like. Even higher - high-level api, including vendor api. Even higher - normal applications.

    Is the whole android built on apps and scripts? I would like to see a worthwhile answer.

    How different?

    • Wow, thanks))) - Flippy