不带Firebase的集成AdMob:不需要的权限(C2D) [英] Integration AdMob without Firebase: unwanted permissions (C2D)

查看:175
本文介绍了不带Firebase的集成AdMob:不需要的权限(C2D)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将AdMob的旧游戏移植到最新的带有Firebase的AdMob。我使用的是过时的AdMob版本。



我希望尽可能实现最小程度的整合,我不想使用Firebase分析工具。我有一个工作集成(使用Android Studio项目),但是当我的apk上传到Google Play时,我意识到自动添加了新的权限:

  android.permission.WAKE_LOCK 
com.frozax.hashiextreme.permission.C2D_MESSAGE
com.google.android.c2dm.permission.RECEIVE

这个C2D是什么东西?我不想也不需要它。 com.frozax.hashiextreme是我的应用程序的包名称。它看起来像是从firebase-iid中添加的,但我也不想要它。



有没有办法忽略这些?我尝试尽可能少权限。

在我的依赖关系中,我只有

  compile'c​​om.google.firebase:firebase-ads:9.0.0'

我尝试删除

pre $ class $ com.google.gms google-services 3.0.0

但是这不起作用,我仍然有这些权限。

谢谢

解决方案

我有同样的问题。
如本所述,您可以添加一些为了避免出现这种情况:

 < uses-permission android:name =android.permission.WAKE_LOCKtools: node =remove/> 
< uses-permission android:name =com.google.android.c2dm.permission.RECEIVEtools:node =remove/>
< uses-permission android:name =your.app.package.permission.C2D_MESSAGEtools:node =remove/>

但是我明确地不知道是否会对Firebase整合产生影响。 b $ b

I'm porting an old game from AdMob to the latest AdMob with Firebase. I was using a deprecated version of AdMob.

I want the smallest integration as possible, I don't want Firebase analytics. I have a working integration (using Android Studio project), but when uploading my apk to Google Play, I realized new permissions were automatically added:

android.permission.WAKE_LOCK
com.frozax.hashiextreme.permission.C2D_MESSAGE
com.google.android.c2dm.permission.RECEIVE

What is this C2D thing? I don't want and don't need it. com.frozax.hashiextreme is the package name of my app. It looks like it's added from firebase-iid, but I don't want it either.

Is there a way to ignore these? I try to have as few permissions as possible.

In my dependecies, I only have

compile 'com.google.firebase:firebase-ads:9.0.0'

I tried to remove

classpath 'com.google.gms:google-services:3.0.0'

But it's not working and I still have these permissions.

Thanks

解决方案

I have the same issue. As described in this Reddit post you can add some lines to your manifest to avoid that:

    <uses-permission android:name="android.permission.WAKE_LOCK" tools:node="remove" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" tools:node="remove" />
    <uses-permission android:name="your.app.package.permission.C2D_MESSAGE" tools:node="remove" />

But I definitively do not know if there will be an impact on Firebase integration.

这篇关于不带Firebase的集成AdMob:不需要的权限(C2D)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆