Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Update for AndroidX #2

Merged
merged 3 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/java/com/gettipsi/stripe/Errors.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/java/com/gettipsi/stripe/PayFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
4 changes: 2 additions & 2 deletions android/src/main/java/com/gettipsi/stripe/StripeModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down