Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added adobeMobileLibrary/adobeMobileLibrary-4.13.2.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions adobeMobileLibrary/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
configurations.maybeCreate("default")
artifacts.add("default", file('adobeMobileLibrary-4.13.2.jar'))
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.2-2'
ext.kotlin_version = '1.1.2-4'
ext.kotlin_version = '1.1.2-4'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.4.0-alpha7'
classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue May 02 16:55:48 EDT 2017
#Wed Jun 14 16:32:12 EDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-milestone-1-all.zip
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up the latest version is gradle-4.0

16 changes: 9 additions & 7 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.0'
compile 'com.android.support:support-vector-drawable:25.3.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:25.3.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:25.3.0'
implementation 'com.android.support:support-vector-drawable:25.3.0'
testCompile 'junit:junit:4.12'
compile project(':simcoe')
compile 'com.jakewharton.timber:timber:4.5.1'
implementation project(':simcoe')
implementation 'com.jakewharton.timber:timber:4.5.1'

// compile project(path: ':simcoe-adobe')
implementation project(':simcoe-adobe')
}
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.os.PersistableBundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.prolificinteractive.simcoe.EmptyProvider;
import com.prolificinteractive.adobe.AdobeProvider;
import com.prolificinteractive.simcoe.trackers.AnalyticsTracking;
import java.util.HashMap;
import java.util.HashSet;
Expand All @@ -18,8 +18,9 @@ protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

final Set<AnalyticsTracking> set = new HashSet<>();
set.add(new EmptyProvider());
//set.add(new EmptyProvider());
//set.add(new MParticleAnalyticsProvider());
set.add(new AdobeProvider("", "sample"));

final SampleAnalyticsHelper sampleAnalyticsHelper = new SampleAnalyticsHelper(set);
sampleAnalyticsHelper.start(this);
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include ':simcoe'
include ':simcoe', ':simcoe-adobe', ':adobeMobileLibrary'
include ':simcoe-mixpanel'
include ':sample'
1 change: 1 addition & 0 deletions simcoe-adobe/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
30 changes: 30 additions & 0 deletions simcoe-adobe/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion

versionCode Integer.parseInt(project.VERSION_CODE)
versionName project.VERSION_NAME

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation project(':simcoe')

implementation project(':adobeMobileLibrary')

testCompile 'junit:junit:4.12'
}
25 changes: 25 additions & 0 deletions simcoe-adobe/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/ellingtonkirby/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
2 changes: 2 additions & 0 deletions simcoe-adobe/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="scotts.com.simcoe_adobe"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package com.prolificinteractive.adobe

import android.content.Context
import com.adobe.mobile.Analytics
import com.adobe.mobile.AudienceManager
import com.prolificinteractive.simcoe.Properties
import com.prolificinteractive.simcoe.Success
import com.prolificinteractive.simcoe.TrackingResult
import com.prolificinteractive.simcoe.trackers.EventTracking
import com.prolificinteractive.simcoe.trackers.PageViewTracking
import com.prolificinteractive.simcoe.trackers.TimedEventTracking

/**
* Creates a new adobe analytics provider instance.
*/

class AdobeProvider(private val token: String ="", private val appName: String) :
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String = "" ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am gonna be removing the token. I am having trouble getting the project to build, it keeps complaining that the prolific-adobe package does not exist. was hoping to get some help on it

EventTracking, PageViewTracking, TimedEventTracking {
override fun startTimedEvent(eventName: String, properties: Properties?): TrackingResult {
Analytics.trackTimedActionStart(eventName, properties)
return Success()
}

override fun stopTimedEvent(eventName: String, properties: Properties?): TrackingResult {
Analytics.trackTimedActionEnd(eventName, Analytics.TimedActionBlock { l1, l2, map ->
map.putAll(properties as Map<out String, Any>)
//needed to return it like this or else it tryed to return out of the whole fun
return@TimedActionBlock true
}
)
return Success()
}

companion object {
private val ADOBE_PROVIDER_NAME = "Adobe"
private val APP = "app"
}

override fun providerName(): String {
return ADOBE_PROVIDER_NAME
}

override fun start(context: Context) {
val map: Map<String, Any> = HashMap()
map.plus(Pair(APP, appName))
AudienceManager.signalWithData(map, null)
}

override fun trackPageView(pageName: String, properties: Properties?): TrackingResult {
Analytics.trackState(pageName, properties)
trackSingleValueWithAudienceManager(pageName, properties)
return Success()
}

override fun trackEvent(eventName: String, properties: Properties?): TrackingResult {
Analytics.trackAction(eventName, properties)
AudienceManager.signalWithData(properties, null)
return Success()
}

override fun stop() {
}

private fun trackSingleValueWithAudienceManager(value: String, properties: Properties?) {
val map: Map<String, Any> = HashMap()
map.plus(Pair(value, properties))
AudienceManager.signalWithData(map, null)
}

}
3 changes: 3 additions & 0 deletions simcoe-adobe/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">simcoe-adobe</string>
</resources>