Contains the source code of the org.nativescript.ata
library used by the nativescript-marketplace-demo app for Android.
cd "ACRA Telerik Analytics"
../gradlew packFramework
This generates .tgz and .aar files in the dist folder.
If you need to make changes to the source code:
- Make the source code changes.
- Increment the version in package.json
- Go to the
"ACRA Telerik Analytics"
folder. - Build with
../gradlew packFramework
- Go back to the repository root folder and then go to the
dist
folder npm publish
the newly generated tgz file.
npm install acra-telerik-analytics
var application = require("application");
application.on(application.launchEvent, function(args) {
if (application.android) {
var analyticsProductKey = "The product key located in the auto-generated code-snippet when you create a new Analytics app for Android in Telerik Platform";
org.nativescript.ata.AnalyticsReportSender.init(application.android.nativeApp, analyticsProductKey);
}
});
Add node_modules/acra-telerik-analytics/platforms/android/ACRA Telerik Analytics-release.aar as a dependency in your Android application project.
package org.nativescript.ata.app;
import android.app.Application;
import android.util.Log;
import org.nativescript.ata.AnalyticsReportSender;
public class ATAApplication extends Application {
@Override
public void onCreate() {
String analyticsProductKey = "The product key located in the auto-generated code-snippet when you create a new Analytics app for Android in Telerik Platform";
AnalyticsReportSender.init(this, analyticsProductKey);
super.onCreate();
}
}