mapp-digital / mapp-intelligence-android-sdk-v5 Goto Github PK
View Code? Open in Web Editor NEWWebtrekk Android SDK V5
Home Page: https://www.webtrekk.com/
License: MIT License
Webtrekk Android SDK V5
Home Page: https://www.webtrekk.com/
License: MIT License
Hi, is there any releated case for impression counts between sdk upgrade. we upgraded our sdk to 5.1.5 from 5.1.1 and we did not changed anything else. but our impressions are going down about %60 in android.
Description
If an Android app uses Koin for DI it is not possible embed this SDK without errors. The SDK uses startKoin()
during intialization. This should normally happen in the onCreate()
of the Application class in the app itself. See: https://insert-koin.io/docs/2.0/documentation/reference/index.html#_the_startkoin_function
Possible fix
Please switch to loadKoinModules
The SDK uses OkHttp 3.13.+, which requires:
Since the SDK supports min API 15, it's an issue using the SDK with devices below API 21.
Hi there ,i am facing an issue where my traces are displayed on console as application package + analytics label. I Would like only label to be displayed.
I am quite sure i am not appending the package anywhere.
Trace appears in the following example format :
com.example.mApplication.Trace01.
Is there any way to omit the package to be displayed on the console? Thanks
Describe the bug
After including the newest version (5.0.8) in our dependencies block (dependencies { implementation 'com.mapp.sdk:intelligence-android:5.0.8' }
) we get the following error during a Gradle build:
> Could not resolve all files for configuration ':****'.
> Could not find org.koin:koin-android:2.1.5.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/koin/koin-android/2.1.5/koin-android-2.1.5.pom
- https://repo.maven.apache.org/maven2/org/koin/koin-android/2.1.5/koin-android-2.1.5.pom
- https://jitpack.io/org/koin/koin-android/2.1.5/koin-android-2.1.5.pom
Required by:
project :APAWLApp > com.mapp.sdk:intelligence-android:5.0.8
According to the error, the above mentioned koin
version cannot be found on maven central.
The developers of koin
recently changed the maven central group id from org.koin
to io.insert-koin
[1] so this build error probably results from the renaming.
[1]: https://github.com/InsertKoinIO/koin#maven-central, 21.05.2021, HEAD d9fdc2266d03ac64c6e7c3946046a052993d8dae
Hello,
the Documentation on
https://documentation.mapp.com/1.0/en/deep-linking-19104150.html
is deprecated.
It shows to use:
val intent = intent
val data = intent.data
val mc = data?.getQueryParameter("wt_mc")
val trackingParams = TrackingParams()
trackingParams.putAll(
mapOf(
Param.MEDIA_CODE to mc!!
)
)
Webtrekk.getInstance().trackCustomEvent("Event Name", trackingParams)
For DeepLink Tracking but Param.MEDIA_CODE
is deprecated.
Usually we track Custom Params the following:
val customParam = customParam(ParamType.CAMPAIGN_PARAM, ??)
trackingParams[customParam] = detail.value
But here i am missing the Int
value where i wrote ??
because i don't know what to use for wt_mc
.
And when using the trackUrl
method i cannot add other parameters.
Our app crashes with following example configuration. The same behavior occurs in our live app.
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example"
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.mapp.sdk:intelligence-android:5.1.0'
implementation "io.insert-koin:koin-android:3.1.2"
}
package com.example.webtrekk
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import webtrekk.android.sdk.Logger
import webtrekk.android.sdk.Webtrekk
import webtrekk.android.sdk.WebtrekkConfiguration
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val webtrekkConfiguration = WebtrekkConfiguration
.Builder(
trackDomain = MY_TRACK_DOMAIN,
trackIds = MY_TRACK_IDS
)
.disableActivityAutoTracking()
.disableAutoTracking()
.disableFragmentsAutoTracking()
.logLevel(Logger.Level.BASIC)
.build()
Webtrekk.getInstance().init(this, webtrekkConfiguration)
}
companion object {
val MY_TRACK_DOMAIN = ""
val MY_TRACK_IDS = listOf<String>()
}
}
java.lang.NoClassDefFoundError: Failed resolution of: Lwebtrekk/android/sdk/core/CustomKoinComponent;
at webtrekk.android.sdk.Webtrekk.<clinit>(Unknown Source:0)
at com.example.webtrekk.MainActivity.onCreate(MainActivity.kt:25)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3755)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3961)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: java.lang.ClassNotFoundException: webtrekk.android.sdk.core.CustomKoinComponent
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at webtrekk.android.sdk.Webtrekk.<clinit>(Unknown Source:0)
at com.example.webtrekk.MainActivity.onCreate(MainActivity.kt:25)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3755)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3961)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/koin/core/KoinComponent;
at webtrekk.android.sdk.Webtrekk.<clinit>(Unknown Source:0)
at com.example.webtrekk.MainActivity.onCreate(MainActivity.kt:25)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3755)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3961)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.koin.core.KoinComponent" on path: DexPathList[[zip file "/data/app/com.example.webtrekk-FD0n8K6ogBrjNCzTm54dRg==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.webtrekk-FD0n8K6ogBrjNCzTm54dRg==/lib/arm64, /system/lib64, /system/product/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at webtrekk.android.sdk.Webtrekk.<clinit>(Unknown Source:0)
at com.example.webtrekk.MainActivity.onCreate(MainActivity.kt:25)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3755)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3961)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Hello,
We trying to update our project to 5.1.5.2 from 5.1.1. But we getting SSL certificate errors. Like;
Could not resolve com.mapp.sdk:intelligence-android:5.1.5.2. > Could not get resource 'https://oss.sonatype.org/content/repositories/snapshots/com/mapp/sdk/intelligence-android/5.1.5.2/intelligence-android-5.1.5.2.pom'. > Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/mapp/sdk/intelligence-android/5.1.5.2/intelligence-android-5.1.5.2.pom'. > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Is this causing by our project side, or is it from webtrekk side? Because we can update successfully to 5.1.5.1
Our dependency update tool reported about the 5.1.4.1
version of Webtrekk but there is no changelog nor release notes yet.
Is this a stable release or a SNAPSHOT?
Describe the bug
If the compileSdk
and targetSdk
is set to api level 31 (Android 12) the app that uses this SDK won't build anymore.
The build fails with the following error:
java.lang.IllegalArgumentException: <package_name>: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:174)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:108)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:86)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
To Reproduce
Steps to reproduce the behavior:
compileSdk
and targetSdk
to api level 31The Build is failing with the above error message.
It's because androidx.work:work-runtime
dependency needs to be updated to 2.7.0
, I think.
Smartphone (please complete the following information):
Additional context
I've did a test to force the usage of androidx.work:work-runtime:2.7.0
by adding the following snippet to the root build.gradle
file:
allprojects {
.
.
project.configurations.all {
resolutionStrategy {
force 'androidx.work:work-runtime:2.7.1'
}
}
}
You may have to include also 'androidx.work:work-runtime-ktx:2.7.1'
or use 'androidx.core:core-ktx:1.7.0'
After that the build passed and I could start and use the app.
Not sure if that is all you need to support android 12 but it would be great to get a fix for this asap. :)
Hope it helps!
Best regards,
Josef
Describe the bug
After updating the mapp sdk to 5.1.5 we observed the following error from the logcat output:
E/webtrekk: 06.01.2023 14:36:14 -> Error getting the cached completed requests: java.lang.IllegalStateException: A migration from 4 to 6 was required but not found. Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...) or allow for destructive migrations via one of the RoomDatabase.Builder.fallbackToDestructiveMigration* methods.
This is not happening in version 5.1.3
and also not in 5.1.4.2
To Reproduce
Steps to reproduce the behavior:
webtrekkConfigurationBuilder.logLevel(Logger.Level.BASIC)
)webtrekk
)Smartphone (please complete the following information):
Additional context
This is not happening in version 5.1.3
and also not in 5.1.4.2
Describe the bug
In the tracking console, we see Activity tracking even if disableAutoTracking()
is called on the Configuration Builder.
To Reproduce
Steps to reproduce the behavior:
WebtrekkConfiguration
.Builder(
trackDomain = getTrackDomain(),
trackIds = getTrackIds()
)
.disableAutoTracking()
.enableMigration()
.logLevel(logLevel)
.okHttpClient(okHttpClient)
.setBatchSupport(true)
.build()
Smartphone (please complete the following information):
Additional context
Please check webtrekk.android.sdk.core.AppStateImpl
and webtrekk.android.sdk.module.InjectionModule.provideAppState()
. TheAppState
is missing where both Fragment
and Activity
tracking are suppressed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.