Skip to content

Commit

Permalink
add support for android 12 - cookies (Httponly, secure,Samesite)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasoul Miri committed Jun 5, 2023
1 parent ed3af22 commit ba3cbe3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ apply plugin: 'kotlin-android-extensions'
version = "4.0.1"

android {
compileSdkVersion 31
compileSdkVersion 33
defaultConfig {
applicationId "se.kantarsifo.mobileanalytics.sampleapp"
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName version
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
tools:targetApi="m">

<activity
android:exported="true"
android:name=".InitializationActivity"
android:windowSoftInputMode="stateHidden">

Expand Down
4 changes: 2 additions & 2 deletions libmobiletagging/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ version = "4.1.2"


android {
compileSdkVersion 30
compileSdkVersion 33
defaultConfig {
minSdkVersion 14
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName version
publishNonDefault true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal class TSMobileAnalyticsBackend : TSMobileAnalytics {
}
val sdkVersion = BuildConfig.VERSION_NAME
val appVersion = activity.getApplicationVersion()
val cookieValue = "trackPanelistOnly=$onlyPanelist&isWebViewBased=$isWebBased&sdkVersion=$sdkVersion&appVersion=$appVersion"
val cookieValue = "trackPanelistOnly=$onlyPanelist&isWebViewBased=$isWebBased&sdkVersion=$sdkVersion&appVersion=$appVersion; Samesite=None; secure; Httponly"
val metaCookie = CookieHandler.createHttpCookie(TagStringsAndValues.SIFO_META_COOKIE_NAME, cookieValue)
CookieHandler.setupPanelistCookies(listOf(metaCookie))
if (paramsAreValid(cpID, applicationName)) {
Expand Down

0 comments on commit ba3cbe3

Please sign in to comment.