diff --git a/android/build.gradle b/android/build.gradle index e2830e3a2..7cd20cdb9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,7 +15,7 @@ android { targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" manifestPlaceholders = [ tipsiStripeRedirectScheme: "example" ] @@ -34,8 +34,8 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.facebook.react:react-native:+' - implementation 'com.android.support:support-v4:27.1.0' - implementation 'com.android.support:appcompat-v7:27.1.0' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'androidx.appcompat:appcompat:1.1.0' implementation "com.google.android.gms:play-services-wallet:$googlePlayServicesVersion" implementation "com.google.firebase:firebase-core:$firebaseVersion" implementation 'com.stripe:stripe-android:8.1.0' diff --git a/android/src/main/java/com/gettipsi/stripe/Errors.java b/android/src/main/java/com/gettipsi/stripe/Errors.java index 7d8ed731d..ad8335930 100644 --- a/android/src/main/java/com/gettipsi/stripe/Errors.java +++ b/android/src/main/java/com/gettipsi/stripe/Errors.java @@ -1,6 +1,6 @@ package com.gettipsi.stripe; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.facebook.react.bridge.ReadableMap; import com.gettipsi.stripe.util.ArgCheck; diff --git a/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java b/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java index 426f2484e..0d2dbfac3 100644 --- a/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java +++ b/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java @@ -2,7 +2,7 @@ import android.app.Activity; import android.content.Intent; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.facebook.react.bridge.Promise; import com.facebook.react.bridge.ReadableMap; diff --git a/android/src/main/java/com/gettipsi/stripe/OpenBrowserActivity.java b/android/src/main/java/com/gettipsi/stripe/OpenBrowserActivity.java index 1a20549ac..d4c7e6827 100644 --- a/android/src/main/java/com/gettipsi/stripe/OpenBrowserActivity.java +++ b/android/src/main/java/com/gettipsi/stripe/OpenBrowserActivity.java @@ -4,7 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; /** * Created by remer on 16/11/17. @@ -22,7 +22,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { url = getIntent().getStringExtra(EXTRA_URL); Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)) - .addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_TOP | + .addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(browserIntent); } diff --git a/android/src/main/java/com/gettipsi/stripe/PayFlow.java b/android/src/main/java/com/gettipsi/stripe/PayFlow.java index 3a92dda46..068086c28 100644 --- a/android/src/main/java/com/gettipsi/stripe/PayFlow.java +++ b/android/src/main/java/com/gettipsi/stripe/PayFlow.java @@ -2,7 +2,7 @@ import android.app.Activity; import android.content.Intent; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import com.facebook.react.bridge.Promise; diff --git a/android/src/main/java/com/gettipsi/stripe/RedirectUriReceiver.java b/android/src/main/java/com/gettipsi/stripe/RedirectUriReceiver.java index 5de3922c6..37f589a92 100644 --- a/android/src/main/java/com/gettipsi/stripe/RedirectUriReceiver.java +++ b/android/src/main/java/com/gettipsi/stripe/RedirectUriReceiver.java @@ -2,7 +2,7 @@ import android.app.Activity; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Log; /** diff --git a/android/src/main/java/com/gettipsi/stripe/StripeModule.java b/android/src/main/java/com/gettipsi/stripe/StripeModule.java index 386d72902..b7fbf963b 100644 --- a/android/src/main/java/com/gettipsi/stripe/StripeModule.java +++ b/android/src/main/java/com/gettipsi/stripe/StripeModule.java @@ -4,8 +4,8 @@ import android.content.Intent; import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import com.facebook.react.bridge.ActivityEventListener; diff --git a/android/src/main/java/com/gettipsi/stripe/dialog/AddCardDialogFragment.java b/android/src/main/java/com/gettipsi/stripe/dialog/AddCardDialogFragment.java index 52fdc3a26..956f45d8c 100644 --- a/android/src/main/java/com/gettipsi/stripe/dialog/AddCardDialogFragment.java +++ b/android/src/main/java/com/gettipsi/stripe/dialog/AddCardDialogFragment.java @@ -5,7 +5,7 @@ import android.app.DialogFragment; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.text.Editable; import android.text.TextWatcher; import android.view.View; diff --git a/android/src/main/java/com/gettipsi/stripe/util/Converters.java b/android/src/main/java/com/gettipsi/stripe/util/Converters.java index 9a52303cc..4b010b619 100644 --- a/android/src/main/java/com/gettipsi/stripe/util/Converters.java +++ b/android/src/main/java/com/gettipsi/stripe/util/Converters.java @@ -1,7 +1,7 @@ package com.gettipsi.stripe.util; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import com.facebook.react.bridge.Arguments; @@ -64,11 +64,11 @@ public static WritableMap putExtraToTokenMap(final WritableMap tokenMap, UserAdd billingContactMap.putString("emailAddress", emailAddress); shippingContactMap.putString("emailAddress", emailAddress); - + extra.putMap("billingContact", billingContactMap); extra.putMap("shippingContact", shippingContactMap); - + tokenMap.putMap("extra", extra); return tokenMap; diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 1ccb55965..addcbd6a3 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -144,9 +144,9 @@ android { dependencies { implementation project(':tipsi-stripe') implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation "com.android.support:support-v4:27.1.0" + implementation "androidx.legacy:legacy-support-v4:1.0.0" implementation "com.android.support:design:27.1.0" - implementation "com.android.support:appcompat-v7:27.1.0" + implementation "androidx.appcompat:appcompat:1.1.0" implementation "com.facebook.react:react-native:+" // From node_modules }