# Android builds: BILLING permission is being injected (solved)

**URL:** <https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858>\
**Category:** Questions\
**Created:** [November 21, 2020, 7:32pm UTC](https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858 "2020-11-21T19:32:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SkaterDad](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/skaterdad/32/41137_2.png) [@SkaterDad](https://forum.defold.com/u/SkaterDad)\
**Post date:** [November 21, 2020, 7:32pm UTC](https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858/1 "2020-11-21T19:32:45Z")

</div>

I decided to try out the extension-IAP 2.0.2 w/ [Android Billing 3.0](https://forum.defold.com/t/help-us-test-android-billing-3-0-support/65909) today.

I was expecting the _com.android.vending.BILLING_ permission to be removed from my bundle’s AndroidManifest.xml, but I’m still seeing it. I’ve double checked the AndroidManifest.xml in all of the extensions I’m using, and do not see that permission anywhere.

It gets added towards the top of the manifest.

 ![image](https://forum-defold.b-cdn.net/uploads/default/original/3X/4/6/46754f96edbf6932abd008c4a44304a83a415a70.png)

Is there something in the build scripts injecting the permission? I’m still using 1.2.174 if that makes a difference.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [November 21, 2020, 7:44pm UTC](https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858/2 "2020-11-21T19:44:24Z")

</div>

[GitHub - defold/extension-iap: In-app purchase extension for Defold · GitHub](https://github.com/defold/extension-iap) does add the **`com.android.vending.BILLING`** permission. I don’t know how gradle works but maybe it is automatically added based on the **`implementation 'com.android.billingclient:billing:3.0.0'`**?

---

<div class="post-metadata">

**Author:** ![SkaterDad](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/skaterdad/32/41137_2.png) [@SkaterDad](https://forum.defold.com/u/SkaterDad)\
**Post date:** [November 21, 2020, 8:04pm UTC](https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858/3 "2020-11-21T20:04:59Z")

</div>

I wouldn’t expect it to do that, since Google says the BILLING permission has been deprecated for a while and isn’t required when you use the newer Billing libraries.

Pretty strange.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [November 21, 2020, 8:06pm UTC](https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858/4 "2020-11-21T20:06:03Z")

</div>

Maybe kept for compatibility reasons for the time being?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [November 21, 2020, 8:56pm UTC](https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858/5 "2020-11-21T20:56:44Z")

</div>

> [@SkaterDad](#):
>
> Google says the BILLING permission has been deprecated for a while

Where do they say that?

> [@Pkeod](#):
>
> I don’t know how gradle works but maybe it is automatically added based on the **`implementation 'com.android.billingclient:billing:3.0.0'`**

This. You can download the dependency from Googles maven repo:

[https://maven.google.com/com/android/billingclient/billing/3.0.0/billing-3.0.0.aar](https://maven.google.com/com/android/billingclient/billing/3.0.0/billing-3.0.0.aar)

Rename it to .zip and unzip. Open the included AndroidManifest.xml stub and you’ll see that it includes `<uses-permission android:name="com.android.vending.BILLING" />`.

The manifest stub will get merged with your main manifest file when bundling.

BTW, For anyone interested in exploring different Android/Java libraries and their dependencies you can find them here: [https://mvnrepository.com/artifact/com.android.billingclient/billing](https://mvnrepository.com/artifact/com.android.billingclient/billing)

---

<div class="post-metadata">

**Author:** ![SkaterDad](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/skaterdad/32/41137_2.png) [@SkaterDad](https://forum.defold.com/u/SkaterDad)\
**Post date:** [November 21, 2020, 9:32pm UTC](https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858/6 "2020-11-21T21:32:15Z")

</div>

Great find @Pkeod.

@britzl I found that messaging here : [https://developer.android.com/topic/google-play-instant/instant-play-games-checklist](https://developer.android.com/topic/google-play-instant/instant-play-games-checklist)

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [November 22, 2020, 9:53am UTC](https://forum.defold.com/t/android-builds-billing-permission-is-being-injected-solved/66858/7 "2020-11-22T09:53:17Z")

</div>

Ok, yes, in 2017 a change was made to the billing library:

Embedded billing permission inside library’s manifest. It’s not necessary to add the com.android.vending.BILLING permission inside Android manifest anymore.

Previously you needed to add the permission yourself. Now it’s added automatically during the build process like I described.
