Need an alternative to FirebaseInitProvider Android content provider with Unity

490 views
Skip to first unread message

simonjeesam

unread,
Jun 7, 2019, 10:55:55 AM6/7/19
to Firebase Google Group
I'm hoping somebody can please help point me in the direction of how I can safely remove the following line from our AndroidManifest.xml but still use Firebase with Unity on Android:
<provider android:authorities="<package name>.firebaseinitprovider" android:exported="false" android:initOrder="100" android:name="com.google.firebase.provider.FirebaseInitProvider"/>

We're using Unity 2018.4.

It may seem like a weird requirement but we're are using a third party security solution that does some encryption on the dex files (among other things) in the apk. As a result of the way this works, we were told having Firebase's <provider...> in the manifest causes issues which they are unable to modify things on their side to fix.

Looking here it seems like it can be done...

  • (1) Removing the google-services plugin from your root build.gradle
  • (2) Deleting the google-services.json from your project
  • (3) Adding the string resources directly
  • (4) Deleting apply plugin: 'com.google.gms.google-services' from your app build.gradle

but I'm a little lost at how this can be done with Unity.
We're building with gradle but not exporting it to a project.
(1) and (2) are easily done, and I'm assuming (3) can be just added to a strings resource files placed under /Assets/Plugins/Android/....
It's (4) that I'm not sure how I can do in Unity and whether there are any other steps we would need to do like initialization that FirebaseInitProvider would usually do for us.

Any help would be appreciated. TIA.


Sam Stern

unread,
Jun 7, 2019, 11:44:06 AM6/7/19
to Firebase Google Group
Hi there,

I really know nothing about Unity, but here's a guide I put together on how to achieve (3):

I hope that's helpful!

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/c7a38ebc-c3e3-4562-9cdb-8cd004ad1030%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

西サイモン

unread,
Jun 10, 2019, 10:54:51 AM6/10/19
to fireba...@googlegroups.com
Thank you they look like they will help!

You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/m4yht1_295k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages