简体   繁体   English

如何在其他应用程序上显示图像(例如 YourHour 应用程序中的计时器)?

[英]how to display a image over other apps(like timer in YourHour app)?

I wanted to make an app that displays a image over other apps.我想制作一个在其他应用程序上显示图像的应用程序。 The best example i could was the timer that is displayed over other apps in YourHour App.我能想到的最好的例子是在 YourHour App 中显示在其他应用程序上的计时器。 The timer keep track of the time I spent on the currently opened app.计时器记录我在当前打开的应用程序上花费的时间。

在此处输入图像描述

But I really don't know how to start with the problem.但我真的不知道如何从这个问题开始。 So, any type of answer is allowed.因此,任何类型的答案都是允许的。

Other important things that might help you give a answer其他可能有助于您给出答案的重要事项

YourHour app takes two permissions YourHour 应用需要两个权限

  1. Display over other apps显示在其他应用程序之上
  2. Usage Access使用权限

One way would be to get the process of the app you want to leech-on and then get the location of the window if present then offset your app from that window.一种方法是获取您想要获取的应用程序的进程,然后获取 window 的位置(如果存在),然后将您的应用程序从 window 偏移。

Some googling and you could get across some ideas here一些谷歌搜索,你可以在这里找到一些想法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM