Open tomwoods opened 10 years ago
Thanks for the info. I added these permissions to plugin.xml of this plugin to make them persistent.
This is what I modified in plugin.xml
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="GAPlugin" >
<param name="android-package" value="com.adobe.plugins.GAPlugin"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</config-file>
<source-file src="src/android/GAPlugin.java"
target-dir="src/com/adobe/plugins" />
<source-file src="src/android/libGoogleAnalyticsV2.jar"
target-dir="libs" />
</platform>
@mchev2 , with this, do you get Google Analytics data onlive on Android? I still cant manage to receive any data from Android (iOS works though) :/
As tomwoods mentioned, for Android extra permissions are needed. It worked after I added the extra permissions. Without it I did not see any data going between GA and our app. I noticed that someone already sent a pull request for the same. https://github.com/phonegap-build/GAPlugin/pull/42
I installed the plugin from git, and I was not able to set up the plugin successfully without the following steps that are missing from the Readme.md file:
Explanation: Without this step, you get a fatal error because the plugin javascript variables haven't been defined.
Explanation: Without ACCESS_NETWORK_STATE, the plugin assumes you are offline and never sends the requests to Google Analytics and eventually shuts down.