简体   繁体   English

Firebase未经许可工作.INTERNET ......怎么样?

[英]Firebase working without permission.INTERNET… How?

My firebase application is running perfectly on my android device without having added the permission.INTERNET flag. 我的firebase应用程序在我的Android设备上运行完美,没有添加permission.INTERNET标志。 I installed Firebase directly from gradle. 我直接从gradle安装了Firebase。 I am aware that adding Firebase through the project structure window in android studio will add the permissions.INTERNET for you. 我知道通过android studio中的项目结构窗口添加Firebase将为您添加权限.INTERNET。 But this is not the case, my Android manifest has nothing in regards to permission.INTERNET yet is still fully functional... 但事实并非如此,我的Android清单没有关于permission.INTERNET的任何内容,但仍然完全正常...

I havent been able to find any info on this... Is this because its now run by Google? 我还没有找到关于此的任何信息...这是因为它现在由谷歌运行?

The documentation for manifest merging states: 清单合并状态的文档

During the build process, the manifest merge process stores a record of each merge transaction in the manifest-merger-{productFlavor}-report.txt file in the module build/outputs/logs folder. 在构建过程中,清单合并进程将每个合并事务的记录存储在模块build / outputs / logs文件夹中的manifest-merger- {productFlavor} -report.txt文件中。 A different log file is generated for each of the module's build variants. 为每个模块的构建变体生成不同的日志文件。

You can look there for a detailed explanation of which library is providing the permission. 您可以在那里查看哪个库提供权限的详细说明。

Or since you are using Android Studio, you can use Ctrl-Shift-N and type "AndroidManifest.xml" to see a dropdown menu of all the manifests in your build and open them to see what they contain. 或者,由于您使用的是Android Studio,因此可以使用Ctrl-Shift-N并键入“AndroidManifest.xml”以查看构建中所有清单的下拉菜单,并打开它们以查看它们包含的内容。

A feature was added to Android Studio 2.2 to show the results of manifest merging. Android Studio 2.2中添加了一项功能,以显示清单合并的结果。 When viewing the manifest in an Editor window, select the Merged Manifest tab at the bottom of the window to see the contributors to the manifest. 在编辑器窗口中查看清单时,选择窗口底部的Merged Manifest选项卡以查看清单的贡献者。

In my build, which includes a number of Firebase libraries, the manifest that adds the INTERNET permission appears to be: 在我的构建中,其中包含许多Firebase库,添加INTERNET权限的清单似乎是:

com.google.firebase\firebase-analytics\9.4.0\AndroidManifest.xml

I was manually managing my Mobile Data's permissions and I discover that, if I block mobile data on "Google Backup Transport", I cannot connect to Firebase. 我手动管理我的移动数据权限,我发现,如果我在“Google备份传输”上阻止移动数据,我就无法连接到Firebase。 I really think this is the reason You can use Your app even without INTERNET permissions. 我真的认为这就是即使没有INTERNET权限你也可以使用你的应用程序的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM