English 中文(简体)
从邮局启动的服务获得资源
原标题:Accessing resources from a service launched at boot

在座标上,我有<条码>BroadcastReceiver,其中标有<条码>。 在<条码>服务/代码>中,我触发了一个<条码> 通知,我希望<条码> 通知/代码>案文从<条码> 活动中检索,用户在<条码>通知时(通过其资源)将启动。

The BroadcastRecevier, the Service and the Activity are all bundled in the same package.

问题是:我如何能够检索<代码>。 活动从<代码>服务<>/代码>获得的资源,因为其中我没有手提过我的<代码>活动? 自<代码><>> > ∗ /代码>在<代码>之前发射以来,我可以无。 活动

提前感谢你们为帮助我而花费的时间。

最佳回答

活动没有资源。 <>Applications有资源。 您的服务将以同样的方式获得您的运用资源(例如通过打电话getString(<>/code>或“getResources()”)。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...