Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase working without permission.INTERNET... How?

My firebase application is running perfectly on my android device without having added the permission.INTERNET flag. I installed Firebase directly from gradle. I am aware that adding Firebase through the project structure window in android studio will add the permissions.INTERNET for you. But this is not the case, my Android manifest has nothing in regards to permission.INTERNET yet is still fully functional...

I havent been able to find any info on this... Is this because its now run by Google?

like image 519
Brent Aureli Avatar asked Aug 20 '16 19:08

Brent Aureli


2 Answers

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

A feature was added to Android Studio 2.2 to show the results of manifest merging. 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.

In my build, which includes a number of Firebase libraries, the manifest that adds the INTERNET permission appears to be:

com.google.firebase\firebase-analytics\9.4.0\AndroidManifest.xml
like image 144
Bob Snyder Avatar answered Oct 11 '22 08:10

Bob Snyder


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. I really think this is the reason You can use Your app even without INTERNET permissions.

like image 1
Mortimer Avatar answered Oct 11 '22 08:10

Mortimer