The previous period of time so that the message of the Union to push, found that the message can be pushed to the device, but not into receiver, can not achieve the message received by custom processing, friends of the Union's
The document is not described. Later consulted the Friends of the Alliance engineers, said adding
Android:exported= "false"
You can do it, try it. The code is as follows:
<!--Listening messages arrive broadcast--- <receiver android:name= "Com.umeng.message.MessageReceiver" android: Exported= "false" android:process= ":p ush" > <intent-filter> <action android:name= " Org.agoo.android.intent.action.RECEIVE "/> </intent-filter> </receiver>
android:exported property details
This property is used to indicate whether the service can be invoked or interacted with by other application components. If set to true, it can be called or interacted with, otherwise it cannot. When set to False, only the component of the same application or an application with the same user ID can start or bind the service.
Its default value depends on the filters that are included with the service. The absence of a filter means that the service can only be invoked by specifying an explicit class name, which means that the service can only be used internally within the application (because other external users will not know the class name of the service), so the default value for this property is false in this case. On the other hand, if at least one filter is included, it means that the service can provide services to other external applications, so the default value is true.
This property is not the only way to limit the exposure of services to other applications. You can also use permissions to restrict external entities that can interact with the service.
Copyright NOTICE: This article is the original blogger article, reproduced please retain the source Http://blog.csdn.net/offbye
Umeng Push message Pit, Android service android:exported detailed