From dc99ac4ae48365c6c8a9832225732a3c303c87f9 Mon Sep 17 00:00:00 2001 From: Greg Davis Date: Fri, 19 Apr 2024 11:38:42 -0600 Subject: [PATCH] Release fix for checkout examples (#33) --- CheckoutExample/app/build.gradle | 10 +++++----- CheckoutExample/app/src/main/AndroidManifest.xml | 1 + .../java/com/kount/checkoutexample/MainActivity.java | 5 ++--- CheckoutExample/kotlinexample/build.gradle | 6 +++--- .../kotlinexample/src/main/AndroidManifest.xml | 3 ++- .../com/kount/checkoutexample/kotlin/MainActivity.kt | 4 ++-- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CheckoutExample/app/build.gradle b/CheckoutExample/app/build.gradle index ab9d31a..1f5b8b3 100644 --- a/CheckoutExample/app/build.gradle +++ b/CheckoutExample/app/build.gradle @@ -2,13 +2,13 @@ apply plugin: 'com.android.application' apply plugin: 'maven-publish' android { - compileSdkVersion 30 + compileSdkVersion 34 buildToolsVersion "29.0.3" defaultConfig { applicationId "com.kount.checkoutexample" - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion 26 + targetSdkVersion 34 versionCode 1 versionName "1.0" } @@ -44,7 +44,7 @@ repositories { jcenter() maven { url "https://jitpack.io" } } -String VERSION_NAME = "4.3.0" +String VERSION_NAME = "4.3.1" String GROUP_ID = "com.kount" String ARTIFACT_ID = "datacollector" @@ -56,7 +56,7 @@ afterEvaluate { artifactId = ARTIFACT_ID version = VERSION_NAME - artifact('../../KountDataCollector/kount-data-collector-4.3.0.jar') + artifact('../../KountDataCollector/kount-data-collector-4.3.1.jar') pom.withXml { def dependenciesNode = asNode().appendNode('dependencies') diff --git a/CheckoutExample/app/src/main/AndroidManifest.xml b/CheckoutExample/app/src/main/AndroidManifest.xml index ad2ccc4..838ced3 100644 --- a/CheckoutExample/app/src/main/AndroidManifest.xml +++ b/CheckoutExample/app/src/main/AndroidManifest.xml @@ -18,6 +18,7 @@ android:theme="@style/AppTheme"> diff --git a/CheckoutExample/app/src/main/java/com/kount/checkoutexample/MainActivity.java b/CheckoutExample/app/src/main/java/com/kount/checkoutexample/MainActivity.java index dc240ec..b810e48 100644 --- a/CheckoutExample/app/src/main/java/com/kount/checkoutexample/MainActivity.java +++ b/CheckoutExample/app/src/main/java/com/kount/checkoutexample/MainActivity.java @@ -24,7 +24,7 @@ public class MainActivity extends AppCompatActivity implements ActivityCompat.OnRequestPermissionsResultCallback { final int PERMISSIONS_REQUEST_LOCATION = 0; - static final int MERCHANT_ID = 999999; // Insert your valid merchant ID + static final String MERCHANT_ID = "999999"; // Insert your valid merchant ID static final int ENVIRONMENT = AnalyticsCollector.ENVIRONMENT_TEST;//For production need to add AnalyticsCollector.ENVIRONMENT_PRODUCTION TextView location; @@ -43,7 +43,7 @@ protected void onCreate(Bundle savedInstanceState) { final TextView environment = (TextView) findViewById(R.id.environment); final Button checkoutButton = (Button) findViewById(R.id.checkoutButton); - merchant.setText(String.format(Locale.US, "%d", MERCHANT_ID)); + merchant.setText(MERCHANT_ID); switch (ENVIRONMENT) { case AnalyticsCollector.ENVIRONMENT_TEST: environment.setText("Test"); @@ -83,7 +83,6 @@ public void onClick(View v) { }); } super.onCreate(savedInstanceState); - } private void requestLocationPermission(Activity activity) { diff --git a/CheckoutExample/kotlinexample/build.gradle b/CheckoutExample/kotlinexample/build.gradle index c691fcf..8abeb07 100644 --- a/CheckoutExample/kotlinexample/build.gradle +++ b/CheckoutExample/kotlinexample/build.gradle @@ -3,13 +3,13 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 30 + compileSdkVersion 34 buildToolsVersion "29.0.3" defaultConfig { applicationId "com.kount.checkoutexample.kotlin" - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion 26 + targetSdkVersion 34 versionCode 1 versionName "1.0" diff --git a/CheckoutExample/kotlinexample/src/main/AndroidManifest.xml b/CheckoutExample/kotlinexample/src/main/AndroidManifest.xml index bec5024..f32322c 100644 --- a/CheckoutExample/kotlinexample/src/main/AndroidManifest.xml +++ b/CheckoutExample/kotlinexample/src/main/AndroidManifest.xml @@ -17,7 +17,8 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> - + diff --git a/CheckoutExample/kotlinexample/src/main/java/com/kount/checkoutexample/kotlin/MainActivity.kt b/CheckoutExample/kotlinexample/src/main/java/com/kount/checkoutexample/kotlin/MainActivity.kt index 6b94066..78373a2 100644 --- a/CheckoutExample/kotlinexample/src/main/java/com/kount/checkoutexample/kotlin/MainActivity.kt +++ b/CheckoutExample/kotlinexample/src/main/java/com/kount/checkoutexample/kotlin/MainActivity.kt @@ -22,7 +22,7 @@ class MainActivity : AppCompatActivity(), ActivityCompat.OnRequestPermissionsRes companion object Cons { - val MERCHANT_ID = 999999 // Insert your valid merchant ID + val MERCHANT_ID = "999999" // Insert your valid merchant ID } override fun onCreate(savedInstanceState: Bundle?) { @@ -35,7 +35,7 @@ class MainActivity : AppCompatActivity(), ActivityCompat.OnRequestPermissionsRes AnalyticsCollector.collectAnalytics(true) AnalyticsCollector.setEnvironment(ENVIRONMENT) - merchant.text = "$MERCHANT_ID" + merchant.text = MERCHANT_ID when (ENVIRONMENT) { AnalyticsCollector.ENVIRONMENT_TEST -> environment.text = "Test" AnalyticsCollector.ENVIRONMENT_PRODUCTION -> environment.text = "Production"