开发者

Get current Activity reference from within Service

开发者 https://www.devze.com 2023-01-22 23:23 出处:网络
So say there\'s an app running (any app). I\'d like to be able to get it\'s Activity from within a Service that will be triggered to run from a android.intent.action.SEARC开发者_运维知识库H_LONG_PRESS

So say there's an app running (any app). I'd like to be able to get it's Activity from within a Service that will be triggered to run from a android.intent.action.SEARC开发者_运维知识库H_LONG_PRESS.

Is this possible?


That is not possible. Other people's apps are not running in your process -- ergo, you cannot have access to any of that app's objects.

0

精彩评论

暂无评论...
验证码 换一张
取 消