Wootric Segment Integration


License

License

GroupId

GroupId

com.wootric
ArtifactId

ArtifactId

analytics-integration-wootric
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

aar
Description

Description

Wootric Segment Integration
Wootric Segment Integration
Project URL

Project URL

https://github.com/Wootric/segment-android-integration-wootric
Source Code Management

Source Code Management

https://github.com/Wootric/segment-android-integration-wootric

Download analytics-integration-wootric

How to add to project

<!-- https://jarcasting.com/artifacts/com.wootric/analytics-integration-wootric/ -->
<dependency>
    <groupId>com.wootric</groupId>
    <artifactId>analytics-integration-wootric</artifactId>
    <version>0.2.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.wootric/analytics-integration-wootric/
implementation 'com.wootric:analytics-integration-wootric:0.2.0'
// https://jarcasting.com/artifacts/com.wootric/analytics-integration-wootric/
implementation ("com.wootric:analytics-integration-wootric:0.2.0")
'com.wootric:analytics-integration-wootric:aar:0.2.0'
<dependency org="com.wootric" name="analytics-integration-wootric" rev="0.2.0">
  <artifact name="analytics-integration-wootric" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.wootric', module='analytics-integration-wootric', version='0.2.0')
)
libraryDependencies += "com.wootric" % "analytics-integration-wootric" % "0.2.0"
[com.wootric/analytics-integration-wootric "0.2.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.wootric : wootric-sdk-android jar 2.17.0
com.android.support » appcompat-v7 jar 26.1.0

Project Modules

There are no modules declared in this project.

Wootric integration for analytics-android.

Installation

This library is distributed as Android library project so it can be included by referencing it as a library project.

If you use Maven, you can include this library as a dependency:

<dependency>
    <groupId>com.wootric</groupId>
    <artifactId>analytics-integration-wootric</artifactId>
    <version>0.2.0</version>
</dependency>

For Gradle users:

compile 'com.wootric:analytics-integration-wootric:0.2.0'

It is also assumed that Segment's android analytics is available. The latest version can be added as dependency this way:

dependencies {
  repositories {
    mavenCentral()
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
  }

  compile 'com.segment.analytics.android:analytics:4.3.1'
}

Usage

(It is advised to read WootricSDK docs first.)

Analytics object should be initialized in the Application class, specifying that the WootricIntegration should be user.

import com.segment.analytics.Analytics;
import com.wootric.analytics.android.integrations.wootric.WootricIntegration;

public class MainApplication extends Application {

    Analytics analytics;

    @Override
    public void onCreate() {
        super.onCreate();

        analytics = new Analytics.Builder(this, "write_key")
                .use(WootricIntegration.FACTORY)
                .build();
    }

    public Analytics getAnalytics() {
        return analytics;
    }
}

Afterwards in the activity the Wootric object can be used to set all optional configurations and call survey() method.

import com.segment.analytics.Analytics;
import com.wootric.analytics.android.integrations.wootric.WootricIntegration;
import com.wootric.androidsdk.Wootric;

public class MainActivity extends Activity {
    @Override
    protected void onResume() {
        super.onResume();

        Analytics analytics = ((MainApplication) getApplication()).getAnalytics();
        analytics.onIntegrationReady(WootricIntegration.FACTORY.key(), new Analytics.Callback<Wootric>() {
            @Override
            public void onReady(Wootric wootric) {
                // Set all aptional configuration here like:
                // wootric.setSurveyImmediately(true);
                // wootric.setLanguageCode("PL");
                wootric.survey();
            }
        });
    }
}

License

The MIT License (MIT)

Copyright (c) 2015 Wootric

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
com.wootric

Wootric

Versions

Version
0.2.0
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0