Cordova Apps
:We need to place the google-services.json
file in app root
(I believe; when working with Cordova apps, we are not to get into other folders/files such as Gradle, Java files, platforms, etc; instead only work with them VIA the config.xml
and www
folder) and refer it in the config.xml
like so:
<platform name="android">
<!-- Add this line -->
<resource-file src="google-services.json" target="app/google-services.json" />
</platform>
Firebase App packagename
is same as the id
attribute in <widget id="<packagename>" ... >
are same.For ex:
<!-- config.xml of Cordova App -->
<widget id="com.appFactory.torchapp" ...>
<!--google-serivces.json from generated from Firebase console.-->
{
...
packagename: "com.appFactory.torchapp",
...
}
Good Luck...