Android Map V2 - Why MAPS_RECEIVE permission

后端 未结 4 1702
Happy的楠姐
Happy的楠姐 2020-12-06 09:01

Consider this as a wiki question.

While I setup my project to support Map V2, There has been a step to add MAPS_RECEIVE permission.



        
4条回答
  •  一整个雨季
    2020-12-06 09:55

    This is the same pattern you see when using Google Cloud Messaging (GCM) with its C2D_MESSAGE permission. The idea is to protect an endpoint in your application (e.g. a broadcast receiver) so that some other component (presumably part of the Maps API) can contact it securely (otherwise, another application could impersonate your application by using the same intent filter).

    In this case, then, Maps API internally sets up such an endpoint (transparently to you) and can, with the use of this permission, that this endpoint cannot be impersonated (because to do so would require the permission, which is protected by your application signature).

提交回复
热议问题