Giter Site home page Giter Site logo

countly / countly-sdk-cordova Goto Github PK

View Code? Open in Web Editor NEW
67.0 14.0 53.0 13.36 MB

Countly Product Analytics SDK for Cordova, Icenium and Phonegap (Archived, Sunsetted)

License: MIT License

JavaScript 7.54% HTML 7.02% Java 9.82% Objective-C 74.03% Shell 0.82% Swift 0.27% Ruby 0.51%
analytics mobile mobile-analytics mobile-web data-analysis data-analytics big-data bigdata insights sdk notifications phonegap icenium javascript

countly-sdk-cordova's Introduction

This SDK has been sunsetted. This repo has been archived and will not be maintained anymore.

Countly Cordova SDK

This repository contains the Countly Cordova SDK, which can be integrated into mobile applications. The Countly Cordova SDK is intended to be used with Countly Community Edition or Countly Enterprise Edition.

What is Countly?

Countly is a product analytics solution and innovation enabler that helps teams track product performance and customer journey and behavior across mobile, web, and desktop applications. Ensuring privacy by design, Countly allows you to innovate and enhance your products to provide personalized and customized customer experiences, and meet key business and revenue goals.

Track, measure, and take action - all without leaving Countly.

Integrating Countly SDK in your projects

For a detailed description on how to use this SDK check out our documentation.

For information about how to add the SDK to your project, please check this section of the documentation.

You can find minimal SDK integration information for your project in this section of the documentation.

For an example integration of this SDK, you can have a look here.

This SDK supports the following features:

Acknowledgements

This SDK was initially written by Panteon Technologies ([email protected]).
From 2014 to 2020 it was maintained by Trinisoft Technologies developers ([email protected]).

Security

Security is very important to us. If you discover any issue regarding security, please disclose the information responsibly by sending an email to [email protected] and not by creating a GitHub issue.

Badges

If you like Countly, why not use one of our badges and give a link back to us so others know about this wonderful platform?

Countly - Product Analytics

<a href="https://count.ly/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://count.ly/badges/dark.svg" alt="Countly - Product Analytics" /></a>

Countly - Product Analytics

<a href="https://count.ly/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://count.ly/badges/light.svg" alt="Countly - Product Analytics" /></a>

How can I help you with your efforts?

Glad you asked! For community support, feature requests, and engaging with the Countly Community, please join us at our Discord Server. We're excited to have you there!

Also, we are on Twitter and LinkedIn if you would like to keep up with Countly related updates.

countly-sdk-cordova's People

Contributors

andreialecu avatar arturskadikis avatar bartoszhernas avatar cdann3r avatar dependabot-preview[bot] avatar dependabot[bot] avatar derekmoorecountly avatar gorkem-cetin avatar gorkemcetin avatar ijunaid avatar nicolsondsouza avatar osoner avatar trinisofttechnologies avatar vgorla-kr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

countly-sdk-cordova's Issues

I got an error when add this plugin to my project

D:\src_workspace\MyApp>cordova plugin add https://github.com/Countly/countly-sdk-js.git
Fetching plugin "https://github.com/Countly/countly-sdk-js.git" via git clone
Repository "https://github.com/Countly/countly-sdk-js.git" checked out to git ref "master".
shell.js: internal error
Error: EXDEV, cross-device link not permitted 'C:\Users\LANSIO~1\AppData\Local\Temp\git\1435130284828\Countly.js'
at Error (native)
at Object.fs.renameSync (fs.js:636:18)
at C:\Users\Lansion08\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\mv.js:77:8
at Array.forEach (native)
at Object._mv (C:\Users\Lansion08\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\mv.js:53:11)
at Object.mv (C:\Users\Lansion08\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\common.js:186:23)
at C:\Users\Lansion08\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\util\plugins.js:53:19
at _fulfilled (C:\Users\Lansion08\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\Lansion08\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\Lansion08\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:749:13)

error: cannot find symbol onRegistrationId

On android I am getting the error

cordova/platforms/android/src/ly/count/android/api/CountlyCordova.java:121:Countly.sharedInstance().onRegistrationId(registrationId);

The method onRegistrationId(String) is undefined for the type Countly

Getting Thread 1: EXC_BAD_ACCESS ( code=1 address=0xc) error

I am getting an error in the recordEvents function on the line NSString *data ( number 790 ) of countly.m
It only happens sometimes after a new install

Error

Thread 1: EXC_BAD_ACCESS ( code=1 address=0xc)

Function

(void)recordEvents:(NSString *)events
{
    NSString *data = [NSString stringWithFormat:@"app_key=%@&device_id=%@&timestamp=%ld&events=%@",
                      self.appKey,
                      [CountlyDeviceInfo udid],
                      time(NULL),
                      events];

    [[CountlyDB sharedInstance] addToQueue:data];

    [self tick];
}

The event object I was sending last

{"eventName":"view-home","eventCount":1,"segments":{"appcountry":"NZ","userId":"7233001","deviceId":"B396AAD6-7E92-48CD-8A88-A0E193D3CB99"}}

Android Segment Only sends first item in segment

I noticed that on android I was only getting the first segment.

I think the problem is in the loop in CountlyCordova.java

for(int i=3,il=5;i<il;i+=2){

should be

for(int i=3,il=args.length();i<il;i+=2){

google-services.json requirement

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 

Getting this error when building my app. I understand this is required if you want to use Android push notifications, but what if I just want to capture analytics, how can this error be resolved?

Thanks

Not using any native code

Hello,

it looks like the countly.js is not using any native code - everything is done in plain javascript. So why we need to use the native sdks? Also is the native OpenUDID never used.

Am I missing something or is the native code unnecessarily?

App Crashes on receiving a push notification

Hi Countly

I am running the cordova countly SDK client. On receiving the message from the GCM the app is crashing with below error.

Can you please help?

Class not found when unmarshalling: ly.count.android.sdk.messaging.Message
E/Parcel ( 848): java.lang.ClassNotFoundException: ly.count.android.sdk.messaging.Message
E/Parcel ( 848): at java.lang.Class.classForName(Native Method)
E/Parcel ( 848): at java.lang.Class.forName(Class.java:251)
E/Parcel ( 848): at java.lang.Class.forName(Class.java:216)
E/Parcel ( 848): at android.os.Parcel.readParcelableCreator(Parcel.java:2133)
E/Parcel ( 848): at android.os.Parcel.readParcelable(Parcel.java:2097)
E/Parcel ( 848): at android.os.Parcel.readValue(Parcel.java:2013)
E/Parcel ( 848): at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
E/Parcel ( 848): at android.os.Bundle.unparcel(Bundle.java:249)
E/Parcel ( 848): at android.os.Bundle.getString(Bundle.java:1118)
E/Parcel ( 848): at android.content.Intent.getStringExtra(Intent.java:4991)
E/Parcel ( 848): at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1334)
E/Parcel ( 848): at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:966)
E/Parcel ( 848): at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3890)
E/Parcel ( 848): at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3793)
E/Parcel ( 848): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:159)
E/Parcel ( 848): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2532)
E/Parcel ( 848): at android.os.Binder.execTransact(Binder.java:404)
E/Parcel ( 848): at dalvik.system.NativeStart.run(Native Method)
E/Parcel ( 848): Caused by: java.lang.NoClassDefFoundError: ly/count/android/sdk/messaging/Message
E/Parcel ( 848): ... 18 more
E/Parcel ( 848): Caused by: java.lang.ClassNotFoundException: Didn't find class "ly.count.android.sdk.messaging.Message" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/Parcel ( 848): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
E/Parcel ( 848): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
E/Parcel ( 848): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
E/Parcel ( 848): ... 18 more
W/dalvikvm(30502): threadid=21: thread exiting with uncaught exception (group=0x41728da0)
E/AndroidRuntime(30502): FATAL EXCEPTION: IntentService[CountlyMessagingService]
E/AndroidRuntime(30502): Process: com.ionicframework.myapp119191, PID: 30502
E/AndroidRuntime(30502): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.ionicframework.myapp119191/ly.count.android.sdk.messaging.ProxyActivity}; have you declared this activity in your AndroidManifest.xml?
E/AndroidRuntime(30502): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1648)
E/AndroidRuntime(30502): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1442)
E/AndroidRuntime(30502): at android.app.ContextImpl.startActivity(ContextImpl.java:1371)
E/AndroidRuntime(30502): at android.app.ContextImpl.startActivity(ContextImpl.java:1353)

Thanks
Vinod

No example for ionic 3

Hi,

I would like to use your services like push notifications for my ionic 3 project. However, I could not find any concrete example using Countly on the web. Could you please provide an example for Ionic 3 if you have any chance to do so? Thank you in advance.

Ability to clear environment data

From customer Danny Lopes

I know it’s been sometime and I have been working on a couple other projects myself so I apologize for not keeping this topic alive but I wanted to follow up on if you were able to complete making the Countly.sharedInstance method available so that we can manually clear the Countly environment data when switching our environments on a device.

The SDK currently does kinda support this kind of functionality, where the required action would be to change the environment/target server.

But the downside would be that all currently not sent data would be erased from the device.

You could call:
"Countly.sharedInstance().halt();"

and then reinitialize the SDK with the new server url and appKey.

iOS crash

I have added the plugin from
https://github.com/nicolsondsouza/countly-sdk-js

However on iOS I now get the error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot create an NSPersistentStoreCoordinator with a nil model'

Thrown from CountlyDB.h on line 226
s_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];

This is how I am calling the code in javascript
if (window.CountlyCordova) {
//initialize
CountlyCordova.init(this.countlyServer, this.key);
var event = {
"eventName": "mypaymentevent",
"eventCount": 1
};
CountlyCordova.sendEvent(event);
}

Enable javascript error logging

Hi,

I would like to be able to log javascript errors with the Cordova Countly JS SDK.

A quick-win would be to add a Countly.log_error(string) method.
And we will use it like this :
Countly.log_error(JSON.stringify(err));

U can have a look at the cordova countly web sdk too :
recordError
You can tell if it is a fatal or non-fatal crash, and add segments on the error.
It seems to handle the format of the error (string/object, stack, ...).

They also have added a feature to capture globally all javascript errors :
track_errors

addCrashLog missing in Countly.js

The documentation refers to manually adding crash log:

// Send a custom crash log
Countly.addCrashLog("My crash log from JavaScript");

This API does not appear to be implemented (yet?) in Countly.js.

Is the intent of the API for application managed non-fatal errors (e.g. gracefully caught 500 responses)?

From tracing through the Android code, its not clear if this should be exposed. I didn't spend a lot of time, but I couldn't find what sends the CrashDetails generated in addCrashLog

Rather should logException be overloaded to take a string? That might make more sense to expose as addCrashLog in Countly.js?

Queue methods when not init

Queue method calls when init is not called,

As the analytics are all over the place.

And don't know if the inits where called.

Issue created from slack on behalf of "Bramzor"

Thanks

Shoold I need to RecordEvent asyn?

I found a problem recently on my android device Nexus-5, my app be came lagging and slow , or even blocked at least 3 seconds. all of these happened just when a RecordEvent method had been invoked. I'm sure of this because when I stopped running RecordEvent, everything became right. It runs nicely till our server of Countly-Service has been stopped for a long while for some reasons. Then I found that the SDK of android is using SharePreference file to cache Event-Data, and this file started becoming larger, like 600kb+. meanwhile my app started to be very slow and lagging, even blocked for a while. So I checked all data of this file and found a very huge 'string' label or element inside of it. I think this might not be a good design for data cache, So my question is how can I prevent this happening again or I just need to run RecordEvent asynchronously every time?

Don’t receive push notifications on iOS with Cordova SDK

We've got a problem with receiving iOS push notifications(We work with Cordova SDK). We set APN Auth key and after that we initialize device, receive registration id from APN, but still can't' receive notifications on device.

Commands we used:

Countly.init("https://us-try.count.ly","our_app_key");
Countly.initMessaging({"messageMode": Countly.messagingMode.PRODUCTION, "projectId": "gcm_id"})
Countly.start();
var push = PushNotification.init({
    android: {
        senderID: "gcm_id"
    },
    ios: {
        alert: "true",
        badge: "true",
        sound: "true"
    }
});
push.on('registration', function(data) {
    Countly.onRegistrationId({
        "registrationId": data.registrationId,
        "mode": Countly.messagingMode.PRODUCTION,
        "projectId": "gcm_id"
    })

   console.log(data.registrationId) // here we get registrationId
});

On dashboard we have something like this:
123

We can create notification from our app, but can't receive them!

Unable to load PlatformApi from platform. Error: Cannot find module

Hi,

I think something is not correct in the build process when i use this plugin.

First, my environnement:
cordova 8.1.2
cordova ios 4.5.5

I have created a cordova project and i have added the plugin with the command in the documentation.

cordova plugin add https://github.com/Countly/countly-sdk-js.git

** In package.json:
Dependencies:

"countly-sdk-js.git": "https://github.com/Countly/countly-sdk-js.git"

Cordova part:

"ly.count.cordova": {}

** In config.xml

<plugin name="ly.count.cordova" spec="https://github.com/Countly/countly-sdk-js.git" />

When in run "cordova platform add [email protected]", it works but i got the plugin twice (in deps) in package.json :

"countly-sdk-js": "git+https://github.com/Countly/countly-sdk-js.git",
"ly.count.cordova": "https://github.com/Countly/countly-sdk-js.git"

Then, i delete my package-lock.json and rerun npm install to get a new one that matches the last updates of the file.

Then, i run "npm ci" (it deletes the node_modules, checks that all is correct between package.json and package-lock.json) but i got the error :

npm ERR! Missing: ly.count.cordova@https://github.com/Countly/countly-sdk-js.git

If i remove the ly.count.cordova from package.json (in deps), delete package-lock.json, rerun npm install, then "npm ci" works.

Then, i delete platforms and plugin directories, and rerun the command:

cordova platform add ios

I got the error:

Using cordova-fetch for cordova-ios@^4.5.5
Adding countly-sdk-js project...
Unable to load PlatformApi from platform. Error: Cannot find module '/private/tmp/test/AppTest/node_modules/countly-sdk-js'
Unhandled "error" event. (The platform "countly-sdk-js" does not appear to be a valid cordova platform. It is missing API.js. countly-sdk-js not supported.)

My opinion:
You should republish a npm package with a unique name cordova-plugin-countly and the same for the plugin id.
Having two different names is a problem for strong industrialisation : ly.count.cordova and countly-sdk-js

GCM 200 message (MismatchSenderId) Push Notification

Hi, I could not get over this issue for a couple of days. It says it sends push notification successfully. However, when I go and see the details of the sent message. It says:

Most probably Countly competes for tokens with other GCM / Firebase SDK you have in your app. Please override the way Countly or another SDK get a token so they would end up using the same token.

I need Countly for push notification facility, but I can't use or set it up correctly.

App crash on iOS with sendEvent and segments

I'm just implementing this plugin and saw my iOS app hard-crash while calling Countly.sendEvent

Upon inspection, I think it is because I didn't have eventCount properly defined on the parameter to sendEvent. After setting eventCount to 1 it stopped crashing.

Relevant lines:
https://github.com/Countly/countly-sdk-js/blob/master/Countly.js#L52
https://github.com/Countly/countly-sdk-js/blob/master/src/ios/CountlyCordova.m#L276

Since eventCount is not defined, the whole array is shifted so the iOS routine crashes by assuming an index in the array that doesn't exist.

I think it's safe to just assume eventCount to be 1 in Countly.js there if it is not defined.

Unused files/folders

Unusued files/folders like Countly.xcdatamodeld, .DS_Store needs to be removed

Using countly-sdk-js with ionic

Hi, I am using countly-sdk-js with ionic, and I have been successfully ran your demo app. Ionic works wth AngularJS and I want to use countly in each controller to send event, but console error : ReferenceError: Countly is not defined.
I want to know how to using countly-sdk-js in angularjs Dependency injection.
Demo code
.controller('DashCtrl', function($scope) { Countly.init("http://172.28.112.102","16be70383b9d4af3e87f81b4de318b53e5d3ecd4"); var events = {"eventName":"event_segment_sum","eventCount":1,"eventSum":"0.99"}; events.segments = {"Country" : "Turkey", "Age" : "28"}; Countly.sendEvent(events); })

Compilation error on CountlyCordova.java

Hi, we have a compilation error with the following env :

  • cordova-android 6.4.0
  • java 8
  • compilation in 1.7
17:40:04                          callbackContext.success("Success");
17:40:04                          ^
17:40:04  /home/jenkins/workspace/scana_scanav2-app_release_2.5.3/platforms/android/src/ly/count/android/sdk/CountlyCordova.java:369: error: local variable callbackContext is accessed from within inner class; needs to be declared final
17:40:04                          callbackContext.error(error);
17:40:04                          ^
17:40:04  /home/jenkins/workspace/scana_scanav2-app_release_2.5.3/platforms/android/src/ly/count/android/sdk/CountlyCordova.java:381: error: local variable callbackContext is accessed from within inner class; needs to be declared final
17:40:04                          callbackContext.success("Success");
17:40:04                          ^
17:40:04  /home/jenkins/workspace/scana_scanav2-app_release_2.5.3/platforms/android/src/ly/count/android/sdk/CountlyCordova.java:383: error: local variable callbackContext is accessed from within inner class; needs to be declared final
17:40:04                          callbackContext.error(error);
17:40:04                          ^
17:40:04  /home/jenkins/workspace/scana_scanav2-app_release_2.5.3/platforms/android/src/ly/count/android/sdk/CountlyCordova.java:399: error: local variable callbackContext is accessed from within inner class; needs to be declared final
17:40:04                          callbackContext.success("Success");
17:40:04                          ^
17:40:04  /home/jenkins/workspace/scana_scanav2-app_release_2.5.3/platforms/android/src/ly/count/android/sdk/CountlyCordova.java:401: error: local variable callbackContext is accessed from within inner class; needs to be declared final
17:40:04                          callbackContext.error(error);
17:40:04                          ^
17:40:04  /home/jenkins/workspace/scana_scanav2-app_release_2.5.3/platforms/android/src/ly/count/android/sdk/CountlyCordova.java:417: error: local variable callbackContext is accessed from within inner class; needs to be declared final
17:40:04                          callbackContext.success("Success");
17:40:04                          ^
17:40:04  /home/jenkins/workspace/scana_scanav2-app_release_2.5.3/platforms/android/src/ly/count/android/sdk/CountlyCordova.java:419: error: local variable callbackContext is accessed from within inner class; needs to be declared final
17:40:04                          callbackContext.error(error);

I think you add "final" to the parameter callbackContext in the method definition.

Best regards
Laurent M.

SDK meta data

Request coming through JS SDK needs to send its own SDK meta data (version and name) for both iOS and Android.

Please edit these lines as below:
2.2 (or 2.2.1 if you plan to make a new release)
js-cordova-ios

iOS
https://github.com/Countly/countly-sdk-js/blob/master/src/ios/sdk/CountlyCommon.m#L19
https://github.com/Countly/countly-sdk-js/blob/master/src/ios/sdk/CountlyCommon.m#L20

Android
https://github.com/Countly/countly-sdk-js/blob/master/src/android/Countly.java#L52
https://github.com/Countly/countly-sdk-js/blob/master/src/android/Countly.java#L56

Until we come up with a better solution, manually overriding these values for each JS SDK release is ok.

Android build error

I am running on;

Cordova CLI: 6.1.1
Gulp version:  CLI version 1.2.1
Gulp local:   Local version 3.9.1
Ionic Version: 1.2.4-nightly-1917
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
OS: Window 10 Pro (64bit)
Node Version: v4.4.4

When I add countly plugin to my project Iget the following build error;

C:\projects\cfmtest>ionic run android
Running command: "C:\Program Files (x86)\Nodist\bin\node.exe" C:\projects\cfmtest\hooks\after_prepare\010_add_platform_class.js C:\projects\cfmtest
add to body class: platform-android
ANDROID_HOME=C:\Android\sdk\
JAVA_HOME=C:\Program Files\java\jdk1.7.0_80
No target specified, deploying to device 'd8f5941'.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:compileDebugAidl
:CordovaLib:generateDebugBuildConfig
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets
:CordovaLib:processDebugManifest
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
:CordovaLib:bundleDebug
:prepareAndroidCordovaLibUnspecifiedDebugLibrary
:preReleaseBuild UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseRenderscript
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources
:CordovaLib:compileReleaseAidl
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets
:CordovaLib:processReleaseManifest
:CordovaLib:processReleaseResources
:CordovaLib:generateReleaseSources
:CordovaLib:compileReleaseJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
:CordovaLib:mergeReleaseJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
:CordovaLib:bundleRelease
:prepareComAndroidSupportSupportV132330Library
:prepareComAndroidSupportSupportV42330Library
:prepareComGoogleAndroidGmsPlayServicesBase840Library
:prepareComGoogleAndroidGmsPlayServicesBasement840Library
:prepareComGoogleAndroidGmsPlayServicesGcm840Library
:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:compileDebugNdk UP-TO-DATE
:compileDebugSources
:transformClassesWithDexForDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
 FAILED
com.android.dex.DexException: Multiple dex files define Landroid/support/v13/app/FragmentCompat$FragmentCompatImpl;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
        at com.android.dx.command.dexer.Main.run(Main.java:277)
        at com.android.dx.command.dexer.Main.main(Main.java:245)
        at com.android.dx.command.Main.main(Main.java:106)




BUILD FAILED

Total time: 54.799 secs
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: Error code 1 for command: cmd with args: /s,/c,"C:\projects\cfmtest\platforms\android\gradlew cdvBuildDebug -b C:\projects\cfmtest\platforms\android\build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

C:\projects\cfmtest>

After some research, phonegap-plugin-push DOCS say;

Then at least one other plugin you have installed is using an outdated way to declare dependencies such asandroid-supportorplay-services-gcm.

EndEvent doesn't send Segmentation

Events that are created with startEvent("Event") and ended with additional information via endEvent({eventName:"Event",countCount:1,segments:{...}}) will not be sent completely to the countly server.

New features for JS SDK

JS SDK should honor the following items to support new Countly server related features

  • be able to set custom device ID upon initialization
  • be able to change deviceID at any time in the app (persistently save new device ID and continue using only that)
  • be able to change deviceID with data merge on server from old device ID using old_device_id api (http://resources.count.ly/docs/i#section-additional-parameters)
  • report local user hour (0-23) together with timestamp (meaning with each request and in each event)
  • report local user day of the week (0-sunday, 1 - monday, ... 6 - saturday) together with timestamp (meaning with each request and in each event)
  • Allow providing duration property in events
  • Allow to measure event duration, by implementing  eventStart(key), which will measure seconds internally until eventEnd(key, ..., other default event properties) is called
  • Report Views (webpages for webSDK, Activities for Android, etc) to provide an option to manually track views and an option to track them automatically, if platform supports it
  • Modify custom user properties through userdata subclass (to allow increment value, multiply value or store multiple values under the same key - array)
  • SDKs should follow HTTP redirection to make requests to Countly api servers
  • Allow sending metadata with each begin session request (http://resources.count.ly/docs/sdk-development-guide#section-sdk-meta-data)

ReadMe

It would be nice to have an instruction on how to implement the script ;)

I'm trying out Appgyvers "Steroids" and would like to know what I need to include..

Versioning unification

There are four versions in the plugin: The tag is 2.6, package.js is 0.0.3, package.json is 1.1.0 and plugin.xml is 0.0.1. We should unify those.

Hybrid Mobile app support : Ionic

I am developing a cross platform app using Ionic Framework and could't find any documentation for integrating countly push notification with angularjs/ionic/cordova.
There is very clear documentation for android and ios separately but same is missing for ionic. The example on github(phonegap example) doesn't run straightaway and the countly.js is lacking explanation on GCM integration.
Can you please provide some resources for implementing push notification in mobile apps created using ionic via countly.

[Cordova] [iOS] Manually set location does not appear in Countly User Profile

Hello,

We are using Countly.setOptionalParametersForInitialization function in both Android and iOS and passing latitude/longitude numbers like this:

{"countryCode":"DK","latitude":56,"longitude":10}

This works well on Android devices - however, it does not work on iOS devices - the coordinates are saved to Countly user, but they are not resolved to any country and city (both displayed Unknown in the Countly User Profile).

However, when we tried another approach of parsing the numbers to float strings with at least one decimal place, it started working including auto discovery of both country and city:

{"countryCode":"DK","latitude":"56.0000","longitude":"10.0000"}

Most probably there is some conversion issue in the iOS native plugin and/or in the server, which may not understand non-float values when trying to parse the coordinates.

Possible fixes - need to include this specific case in Documentation (remind users to pass float strings), or to fix the conversion issues inside plugin/Countly server.

ionic countly encounter "Couldn't store configuration in Countly Messaging"

1.i follow up the construction https://github.com/trinisofttechnologies/countly_ionic_example ,but encountered some problems
1)Couldn't store configuration in Countly Messaging
2)i did not get google-play service and i don't want and need push service ~

how should i do ?
i have push notification in my app .
in my AndroidManifest.xml

    <service android:enabled="true" android:exported="false" android:icon="@drawable/logo" android:label="${package_name}" android:name=".tcp.service.SfPushService" android:process=":SfPushService" />
    <receiver android:name=".service.reciver.TcpNotifyReceiver">
        <intent-filter>
            <action android:name="com_sf_tcp_network_action" />
            <action android:name="com_sf_tcp_push_action" />
        </intent-filter>
    </receiver>

in my build.gradle

compile 'com.google.android.gms:play-services:9.4.0'

if i did not add this dependency ,it fails build

my error log

09-22 16:14:37.316 15066-15413/com.sf.sasp.debug E/MessagingAdapter: Couldn't store configuration in Countly Messaging
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at ly.count.android.sdk.MessagingAdapter.storeConfiguration(MessagingAdapter.java:40)
at ly.count.android.sdk.Countly.init(Countly.java:197)
at ly.count.android.sdk.CountlyCordova.execute(CountlyCordova.java:28)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
at org.apache.cordova.PluginManager.exec(PluginManager.java:133)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:1468)
at android.content.res.Resources.getString(Resources.java:1564)
at android.content.Context.getString(Context.java:415)
at ly.count.android.sdk.messaging.CountlyMessaging.storeConfiguration(CountlyMessaging.java:142)
at java.lang.reflect.Method.invoke(Native Method) 
at ly.count.android.sdk.MessagingAdapter.storeConfiguration(MessagingAdapter.java:40) 
at ly.count.android.sdk.Countly.init(Countly.java:197) 
at ly.count.android.sdk.CountlyCordova.execute(CountlyCordova.java:28) 
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98) 
at org.apache.cordova.PluginManager.exec(PluginManager.java:133) 
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59) 
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41) 
at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) 
at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:158) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
09-22 16:14:44.346 15066-15413/com.sf.sasp.debug W/GooglePlayServicesUtil: Cannot find Google Play services package name.
android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:201)
at com.google.android.gms.internal.zzro.getPackageInfo(Unknown Source)
at com.google.android.gms.common.zze.zzby(Unknown Source)
at com.google.android.gms.common.zze.zzbx(Unknown Source)
at com.google.android.gms.common.zze.zzbs(Unknown Source)
at com.google.android.gms.common.zze.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at ly.count.android.sdk.messaging.CountlyMessaging.checkPlayServices(CountlyMessaging.java:215)
at ly.count.android.sdk.messaging.CountlyMessaging.init(CountlyMessaging.java:126)
at java.lang.reflect.Method.invoke(Native Method)
at ly.count.android.sdk.MessagingAdapter.init(MessagingAdapter.java:27)
at ly.count.android.sdk.Countly.initMessaging(Countly.java:264)
at ly.count.android.sdk.Countly.initMessaging(Countly.java:248)
at ly.count.android.sdk.CountlyCordova.execute(CountlyCordova.java:131)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
at org.apache.cordova.PluginManager.exec(PluginManager.java:133)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)
09-22 16:14:48.806 15066-15413/com.sf.sasp.debug E/MessagingAdapter: Couldn't store configuration in Countly Messaging
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at ly.count.android.sdk.MessagingAdapter.storeConfiguration(MessagingAdapter.java:40)
at ly.count.android.sdk.Countly.initMessaging(Countly.java:271)
at ly.count.android.sdk.Countly.initMessaging(Countly.java:248)
at ly.count.android.sdk.CountlyCordova.execute(CountlyCordova.java:131)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
at org.apache.cordova.PluginManager.exec(PluginManager.java:133)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:1468)
at android.content.res.Resources.getString(Resources.java:1564)
at android.content.Context.getString(Context.java:415)
at ly.count.android.sdk.messaging.CountlyMessaging.storeConfiguration(CountlyMessaging.java:142)
at java.lang.reflect.Method.invoke(Native Method) 
at ly.count.android.sdk.MessagingAdapter.storeConfiguration(MessagingAdapter.java:40) 
at ly.count.android.sdk.Countly.initMessaging(Countly.java:271) 
at ly.count.android.sdk.Countly.initMessaging(Countly.java:248) 
at ly.count.android.sdk.CountlyCordova.execute(CountlyCordova.java:131) 
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98) 
at org.apache.cordova.PluginManager.exec(PluginManager.java:133) 
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59) 
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41) 
at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) 
at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:158) 
at android.os.HandlerThread.run(HandlerThread.java:61) 

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.