From 594c6fa6d765441fc231c5f9cbb7e8c5204c15ac Mon Sep 17 00:00:00 2001 From: Mpendulo Ndlovu Date: Wed, 2 Oct 2024 09:44:37 +0200 Subject: [PATCH 1/3] chore: update analytics tracking --- .../androidsdk/CommunicationClient.kt | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/metamask-android-sdk/src/main/java/io/metamask/androidsdk/CommunicationClient.kt b/metamask-android-sdk/src/main/java/io/metamask/androidsdk/CommunicationClient.kt index 28810d91..669534f1 100644 --- a/metamask-android-sdk/src/main/java/io/metamask/androidsdk/CommunicationClient.kt +++ b/metamask-android-sdk/src/main/java/io/metamask/androidsdk/CommunicationClient.kt @@ -112,27 +112,15 @@ class CommunicationClient( ) parameters.putAll(params) - when(event) { - Event.SDK_CONNECTION_REQUEST_STARTED -> { - parameters["commLayer"] = SDKInfo.PLATFORM - parameters["sdkVersion"] = SDKInfo.VERSION - parameters["url"] = dappMetadata?.url ?: "" - parameters["title"] = dappMetadata?.name ?: "" - parameters["platform"] = SDKInfo.PLATFORM - parameters["channelId"] = sessionId - } - Event.SDK_RPC_REQUEST -> { - parameters["commLayer"] = SDKInfo.PLATFORM - parameters["sdkVersion"] = SDKInfo.VERSION - parameters["url"] = dappMetadata?.url ?: "" - parameters["title"] = dappMetadata?.name ?: "" - parameters["platform"] = SDKInfo.PLATFORM - parameters["timestamp"] = TimeStampGenerator.timestamp() - parameters["channelId"] = sessionId - parameters["from"] = "mobile" - } - else -> Unit - } + parameters["commLayer"] = SDKInfo.PLATFORM + parameters["sdkVersion"] = SDKInfo.VERSION + parameters["url"] = dappMetadata?.url ?: "" + parameters["title"] = dappMetadata?.name ?: "" + parameters["platform"] = SDKInfo.PLATFORM + parameters["timestamp"] = TimeStampGenerator.timestamp() + parameters["channelId"] = sessionId + parameters["dappId"] = appContextRef.get()?.packageName ?: "N/A" + parameters["from"] = "mobile" tracker.trackEvent(event, parameters) } From 5f2b8ea622dec5cafaa29c3f0c30fe35799a5446 Mon Sep 17 00:00:00 2001 From: Mpendulo Ndlovu Date: Wed, 2 Oct 2024 09:45:24 +0200 Subject: [PATCH 2/3] update analytics endpoint --- .../src/main/java/io/metamask/androidsdk/Analytics.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metamask-android-sdk/src/main/java/io/metamask/androidsdk/Analytics.kt b/metamask-android-sdk/src/main/java/io/metamask/androidsdk/Analytics.kt index bee050c4..70167e59 100644 --- a/metamask-android-sdk/src/main/java/io/metamask/androidsdk/Analytics.kt +++ b/metamask-android-sdk/src/main/java/io/metamask/androidsdk/Analytics.kt @@ -22,8 +22,8 @@ interface Tracker { class Endpoints { companion object { - private const val BASE_URL = "https://metamask-sdk-socket.metafi.codefi.network" - const val ANALYTICS = "$BASE_URL/debug" + private const val BASE_URL = "https://metamask-sdk.api.cx.metamask.io" + const val ANALYTICS = "$BASE_URL/evt" } } From cf47ae8320da4891bd99ab44d7b0b77b9efdbeab Mon Sep 17 00:00:00 2001 From: Mpendulo Ndlovu Date: Wed, 2 Oct 2024 09:49:34 +0200 Subject: [PATCH 3/3] bump version number --- metamask-android-sdk/build.gradle | 4 ++-- .../src/main/java/io/metamask/androidsdk/SDKInfo.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metamask-android-sdk/build.gradle b/metamask-android-sdk/build.gradle index 44e5dddc..17761179 100644 --- a/metamask-android-sdk/build.gradle +++ b/metamask-android-sdk/build.gradle @@ -15,7 +15,7 @@ android { targetSdk 33 ext.versionCode = 1 - ext.versionName = "0.6.5" + ext.versionName = "0.6.6" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles 'consumer-rules.pro' @@ -67,7 +67,7 @@ dependencies { ext { PUBLISH_GROUP_ID = 'io.metamask.androidsdk' - PUBLISH_VERSION = '0.6.5' + PUBLISH_VERSION = '0.6.6' PUBLISH_ARTIFACT_ID = 'metamask-android-sdk' } diff --git a/metamask-android-sdk/src/main/java/io/metamask/androidsdk/SDKInfo.kt b/metamask-android-sdk/src/main/java/io/metamask/androidsdk/SDKInfo.kt index 61072275..3b37464a 100644 --- a/metamask-android-sdk/src/main/java/io/metamask/androidsdk/SDKInfo.kt +++ b/metamask-android-sdk/src/main/java/io/metamask/androidsdk/SDKInfo.kt @@ -1,6 +1,6 @@ package io.metamask.androidsdk object SDKInfo { - const val VERSION = "0.6.5" + const val VERSION = "0.6.6" const val PLATFORM = "android" } \ No newline at end of file