Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编写一个系统应用程序。我需要知道当前在浏览器中打开了哪些 URL。我的应用程序包含Service确定哪个应用程序在前面处于活动状态。此外,我的应用程序包含IME(SoftKeyboard),它可以访问浏览器活动的可编辑视图(如果我的 IME 已打开且处于活动状态)。是否可以在浏览器(本机浏览器、Opera、Chrome 等)中打开当前 URL?我可以从Service或从获取此 URLIME吗?
Service
IME
我用inputEditor.fieldName在IME. 在 SDK 2.3.XI 中获得该属性等价物field_name\http://domain.com?blablabla。我可以解析这个字符串并获取当前 URL http://domain.com?blablabla。
inputEditor.fieldName
field_name\http://domain.com?blablabla
http://domain.com?blablabla
但这仅适用于 SDK 2.3.X,不适用于其他 SDK。这个属性返回null。可能在另一个 SDK 中有一个类似的属性吗?
null
关于如何从自己的浏览器获取当前 URL 的任何想法IME?