Android Map V2 - Why MAPS_RECEIVE permission
Asked Answered
S

4

32

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.

<permission
          android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
          android:protectionLevel="signature"/>
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>

Why we creating and consuming the permission from the app itself?

Is that google play services app interact using this permission ?

This permission can't takes care of these things?

<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

I thought the use of custom permission is to allow other apps to launch/use our app's services/resources.

Semiliquid answered 12/2, 2013 at 12:45 Comment(2)
I am just curious about why we setting this permission. By the way my project working fine with the Map V2.Semiliquid
@MontyThreeCard yes.. I haven't follow up this post a whileSemiliquid
H
85

For future visitors:

This permission is now completely unnecessary. The latest update of Google Play Services 3.1.59 made it useless. As a result, it can be removed.

source

Helladic answered 30/7, 2013 at 2:31 Comment(0)
O
6

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).

Ostracize answered 7/3, 2013 at 7:12 Comment(1)
For future visitors look at @Exception-al answer: "This permission is now completely unnecessary. The latest update of Google Play Services 3.1.59 made it useless. As a result, it can be removed."Trigonal
A
5

This permission specifies your package name. i.e.

  <permission
          android:name="package_name.permission.MAPS_RECEIVE"
          android:protectionLevel="signature"/>
  <uses-permission android:name="package_name.permission.MAPS_RECEIVE"/>

thus, the google API simply allows your project to recieve the map. The permission tells where to use the API.

Anthropopathy answered 9/2, 2014 at 18:59 Comment(0)
I
3

I found that this permission is still needed when using the debug certificate. When I exported and signed my application it worked fine, but it wouldn't work when I used the debug cert. I have the MD5 for both my debug cert and application cert associated with the same key. When I finally added these extra permissions, it worked. I am using a Moto X running 4.4 with everything up to date.

Inmesh answered 6/1, 2014 at 16:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.