在谷歌云消息推送GCM中,为什么需要在AndroidManifest添加如下权限声明,有什么原理吗?
伊谢尔伦
伊谢尔伦 2017-04-17 17:21:59
0
2
708

在Google Cloud Messaging(GCM)中,需要在AndroidManifest文件中添加下面的权限声明,小米推送和个推也有类似的做法,有什么原理吗?

code from cloud-messaging/android/client#manifest

<permission android:name="<your-package-name>.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="<your-package-name>.permission.C2D_MESSAGE" />
伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
大家讲道理

Won’t gcm hit a wall in China? How do you use it

左手右手慢动作

These permissions are custom permissions for the security of mutual access calls between applications. Application A defines permission statement permission,应用B想和应用A交互,得声明使用A声明的特定权限,即uses-permissionandroid:protectionLevel="signature" which means that while it has permission, the applications that access each other must have the same application signature to access each other.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template