Giter Site home page Giter Site logo

ga-sdk-cordova's People

Contributors

dorin-ga avatar the1schwartz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ga-sdk-cordova's Issues

Update doc to require cocoapods

On a brand new computer, I had compilation errors (symbols not found)
After some search and tries to remove/add the plugin again, I found out that cocoapods is required. It's not mandatory for other plugins or a base cordova app therefore I think it should be mentioned

Cordova Plugin Dependencies

C2 and C3 plugins don't have any cordova dependencies.
If you make Android apk Build, GameAnalytics will not work.
This Cordova plugins not included in project.
cordova-plugin-gameanalytics
cordova-plugin-device

for C3 SDK
https://www.construct.net/make-games/manuals/addon-sdk/reference/specifying-dependencies

for C2 SDK
You need to add this value in edittime.js C2 currently supported only one cordova dependencies. Idk maybe you can talk with Ashley about this, for add multi dependencies.
image

This will add in config file this part

<plugin name="cordova-plugin-gameanalytics" />

Not working on android

Hi,
I'm trying to make it work with cordova-android 8.1.0, cordova-plugin-gameanalytics 3.0.9. My device is Android 8.0.0.
I can't get any event on the live feed.
I have this error in logcat

2020-05-27 23:46:56.501 23693-23981/ I/GameAnalytics: Info/GameAnalytics: Info logging enabled
2020-05-27 23:46:56.510 23693-23969/ W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/instantapps/InstantApps;
2020-05-27 23:46:56.510 23693-23969/ W/System.err:     at com.gameanalytics.sdk.GAPlatform.initializeWithActivity(GAPlatform.java:77)
2020-05-27 23:46:56.510 23693-23969/ W/System.err:     at com.gameanalytics.sdk.GameAnalytics.initializeWithGameKey(GameAnalytics.java:360)
2020-05-27 23:46:56.510 23693-23969/ W/System.err:     at com.gameanalytics.sdk.cordova.GameAnalyticsCordova.execute(GameAnalyticsCordova.java:162)
2020-05-27 23:46:56.510 23693-23969/ W/System.err:     at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
2020-05-27 23:46:56.511 23693-23969/ W/System.err:     at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
2020-05-27 23:46:56.511 23693-23969/ W/System.err:     at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
2020-05-27 23:46:56.511 23693-23969/ W/System.err:     at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
2020-05-27 23:46:56.511 23693-23969/ W/System.err:     at android.os.MessageQueue.nativePollOnce(Native Method)
2020-05-27 23:46:56.511 23693-23969/ W/System.err:     at android.os.MessageQueue.next(MessageQueue.java:325)
2020-05-27 23:46:56.511 23693-23969/ W/System.err:     at android.os.Looper.loop(Looper.java:142)
2020-05-27 23:46:56.511 23693-23969/ W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:65)
2020-05-27 23:46:56.515 23693-23969/ W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.instantapps.InstantApps" on path: DexPathList[[zip file "/data/app/-W3rKePH0wBfL5FAASZmqYw==/base.apk"],nativeLibraryDirectories=[/data/app/-W3rKePH0wBfL5FAASZmqYw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
2020-05-27 23:46:56.515 23693-23969/ W/System.err:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
2020-05-27 23:46:56.516 23693-23969/ W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
2020-05-27 23:46:56.516 23693-23969/ W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
2020-05-27 23:46:56.516 23693-23969/ W/System.err: 	... 11 more
2020-05-27 23:46:56.523 23693-23693/ D/BezellessGripSuppressionFilter: getdisplaysize, x : 1440 y : 2880
2020-05-27 23:46:56.525 23693-23693/ D/SystemWebChromeClient: file:///android_asset/www/plugins/cordova-plugin-gameanalytics/www/GameAnalytics.js: Line 71 : GameAnalytics.initialize
2020-05-27 23:46:56.525 23693-23693/ I/chromium: [INFO:CONSOLE(71)] "GameAnalytics.initialize", source: file:///android_asset/www/plugins/cordova-plugin-gameanalytics/www/GameAnalytics.js (71)

The callback onComplete for initialisation is never executed so I guess the initialisation is not actually done.

GameAnalytics - not work on mobile

I was test latest Construct 2 GA plugin. It works on preview but not work on mobile. I tested on android device.

GameEngine: Construct 2 r268
GameAnalytics plugin: 2.2.0
Cordova CLI: v9.0.0

Construct 2 Project File
GATest.zip

Cordova Export
GATest-CordovaExport.zip

Screenshot - Eventsheet
3

GameAnalytics Properties: "Enable info log" : FALSE

Construct 2 : Preview Project - Chrome (Works fine)

GATest-2

Android Device : Chrome Inspector
"Enable info log" : FALSE but it is shows console logs.
GATest-1

GameAnalytics Dashboard
GATest-3

GameAnalytics Properties: "Enable info log" : TRUE

Construct 2 : Preview Project - Chrome (Works fine)
test2

Android Device : Chrome Inspector
"Enable info log" : TRUE but it is shows same console logs.
GATest-1

Compile error on Cocoon.io

Hi,
when I use the cordova plugin on cocoon.io I get following build error:

COMPILER ERROR:

/workspace/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • Where:
    Script '/workspace/platforms/android/cordova-plugin-crosswalk-webview/ga-xwalk.gradle' line: 161

  • What went wrong:
    A problem occurred evaluating root project 'android'.

Could not find method implementation() for arguments [org.xwalk:xwalk_core_library:23+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

CORDOVA LOG:

�[36m20180824T091409 [DEBUG] AndroidBuilder -�[39m [prepare] cordova restore platforms
�[36m20180824T091409 [DEBUG] AndroidBuilder -�[39m [prepare] adding engine [email protected]
Subproject Path: CordovaLib
Subproject Path: CordovaLib
Subproject Path: CordovaLib
Subproject Path: CordovaLib
Subproject Path: CordovaLib
Subproject Path: CordovaLib
�[36m20180824T091445 [DEBUG] AndroidBuilder -�[39m [prepare] cordova restore plugins
�[36m20180824T091445 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin [email protected]
�[36m20180824T091445 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin [email protected]
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin [email protected]
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin [email protected]
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin [email protected]
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin [email protected]
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin cordova-plugin-device@*
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin cordova-plugin-dialogs@*
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin cordova-plugin-gameanalytics@*
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin cordova-plugin-inappbrowser@*
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [prepare] adding plugin cordova-plugin-whitelist@1
�[36m20180824T091446 [DEBUG] AndroidBuilder -�[39m [build]
Warning: File /.android/repositories.cfg could not be loaded.
�[36m20180824T091447 [DEBUG] AndroidBuilder -�[39m [build] create certs folder
�[36m20180824T091447 [DEBUG] AndroidBuilder -�[39m [build] keystore
�[36m20180824T091448 [DEBUG] AndroidBuilder -�[39m [build] create build.json
�[36m20180824T091448 [DEBUG] AndroidBuilder -�[39m [build] call cordova
Removed LAUNCHER flag
ANDROID_HOME=/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux
JAVA_HOME=/usr/lib/jvm/default-java
Subproject Path: CordovaLib
null
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_9d2trztayc98mx0p6c4px57m9.run(/workspace/platforms/android/build.gradle:142)
org.xwalk:xwalk_core_library:23+

FAILURE: Build failed with an exception.

  • Where:
    Script '/workspace/platforms/android/cordova-plugin-crosswalk-webview/ga-xwalk.gradle' line: 161

  • What went wrong:
    A problem occurred evaluating root project 'android'.

Could not find method implementation() for arguments [org.xwalk:xwalk_core_library:23+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.045 secs
�[91m20180824T091452 [ERROR] AndroidBuilder -�[39m { Error: /workspace/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • Where:
    Script '/workspace/platforms/android/cordova-plugin-crosswalk-webview/ga-xwalk.gradle' line: 161

  • What went wrong:
    A problem occurred evaluating root project 'android'.

Could not find method implementation() for arguments [org.xwalk:xwalk_core_library:23+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/workspace/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
    stderr:
    '\nFAILURE: Build failed with an exception.\n\n* Where:\nScript '/workspace/platforms/android/cordova-plugin-crosswalk-webview/ga-xwalk.gradle' line: 161\n\n* What went wrong:\nA problem occurred evaluating root project 'android'.\n> Could not find method implementation() for arguments [org.xwalk:xwalk_core_library:23+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\n',
    stdout:
    'null\nThe Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.\n\tat build_9d2trztayc98mx0p6c4px57m9.run(/workspace/platforms/android/build.gradle:142)\norg.xwalk:xwalk_core_library:23+\n\nBUILD FAILED\n\nTotal time: 1.045 secs\n',
    code: 1 }

I only added the game analytics plugin and the "device" plugin to the project. The framework I'm using is Construct 3 if it matters.

Thank you!

Android 10.1.0 Build Error

We can't compile using [email protected]

Android Studio

Android Studio Arctic Fox | 2020.3.1 Patch 3
Build #AI-203.7717.56.2031.7784292, built on October 1, 2021
Runtime version: 11.0.10+0-b96-7249189 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 16
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin

ERROR LOGS

1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app

> Configure project :app
WARNING:: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 7.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01

> Task :app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
   > Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(http://maven.gameanalytics.com/release)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.1.1/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings```

Warning from Google about play-services-tasks

Hi there,

When trying to upload an APK to the Google Play store I'm getting the following warning message:


The developer of play-services-tasks (com.google.android.gms:play-services-tasks) has reported critical issues with version 18.0.0. Consider upgrading before publishing a new release.

Here's what the SDK developer told us:

play-services-tasks v18.0.0 has known issues that can lead to runtime NPEs (NullPointerException) when handling Task results in Kotlin code. We strongly recommend that you avoid using this version. This also impacts the SDKs listed in the December 9, 2021 release, because they all depend on play-services-tasks. A fix for this issue is included in play-services-tasks v18.0.1. See https://developers.google.com/android/guides/releases#december_16_2021


I'm pretty certain that it's the Game Analytics plugin that is causing the message because if I remove the plugin, the warning disappears.

I'm running plugin version 4.2.5 and I'm using Ionic Appflow to build the APK.

I'd be really grateful if you could suggest a solution or update the plugin with a fix.

Many thanks!

Using a number for addProgressionEvent makes the app crash

Using a number for addProgressionEvent makes the app crash:

Example:

GameAnalytics.addProgressionEvent({
    progressionStatus: GameAnalytics.EGAProgressionStatus.Start,
    progression01: "world01",
    progression02: 15
});

Produces this:

Application Specific Information:
abort() called

Last Exception Backtrace:
0   CoreFoundation                	0x214b63ea0 __exceptionPreprocess + 228
1   libobjc.A.dylib               	0x213d35a40 objc_exception_throw + 55
2   CoreFoundation                	0x214a7cd04 -[NSObject+ 216324 (NSObject) doesNotRecognizeSelector:] + 139
3   CoreFoundation                	0x214b697b8 ___forwarding___ + 1411
4   CoreFoundation                	0x214b6b45c _CF_forwarding_prep_0 + 91
5   MyApp                        	0x10074bb70 +[GAHelpers isStringNullOrEmptyWithString:] + 27
6   MyApp                       	0x100757540 +[GAValidator validateProgressionEventWithProgressionStatus:andProgression01:andProgression02:andProgression03:] + 207
7   MyApp                       	0x1007466f4 +[GAEvents addProgressionEventWithProgressionStatus:andProgression01:andProgression02:andProgression03:andScore:fields:] + 183
8   MyApp                       	0x100740c3c __113+[GameAnalytics addProgressionEventWithProgressionStatus:progression01:progression02:progression03:score:fields:]_block_invoke + 123
9   libdispatch.dylib             	0x21459d6c8 _dispatch_call_block_and_release + 23
10  libdispatch.dylib             	0x21459e484 _dispatch_client_callout + 15
11  libdispatch.dylib             	0x214545be0 _dispatch_lane_serial_drain$VARIANT$mp + 591
12  libdispatch.dylib             	0x214546728 _dispatch_lane_invoke$VARIANT$mp + 431
13  libdispatch.dylib             	0x21454eec8 _dispatch_workloop_worker_thread + 599
14  libsystem_pthread.dylib       	0x2147800dc _pthread_wqthread + 311
15  libsystem_pthread.dylib       	0x214782cec start_wqthread + 3

I could fix it by adding toString() to my var but crashing an app because of analytics is not very fun
Parameters could be controlled/changed to string here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.