diff --git a/android/build.gradle b/android/build.gradle index 53a1a73..41aa015 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,23 +1,19 @@ apply plugin: "com.android.library" android { - compileSdkVersion 25 - buildToolsVersion "25.0.1" + compileSdkVersion rootProject.ext.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33 + buildToolsVersion rootProject.ext.hasProperty('buildToolsVersion') ? rootProject.ext.buildToolsVersion : "33.0.0" defaultConfig { - minSdkVersion 16 - targetSdkVersion 23 + minSdkVersion rootProject.ext.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23 + targetSdkVersion rootProject.ext.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33 versionCode 1 versionName "1.0" } } dependencies { - compile "com.facebook.react:react-native:+" // From node_modules - compile 'com.android.support:customtabs:25.0.1' - compile ('com.github.droibit.customtabslauncher:launcher:1.0.8') { - exclude module: 'customtabs' - } - - testCompile 'junit:junit:4.12' -} \ No newline at end of file + implementation 'com.facebook.react:react-native:+' + implementation 'androidx.browser:browser:1.5.0' + implementation 'com.github.droibit.customtabslauncher:launcher:1.0.8' +} diff --git a/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java b/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java index 957c3ca..2739759 100644 --- a/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java +++ b/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java @@ -6,7 +6,7 @@ import android.content.Intent; import android.os.Bundle; import android.provider.Browser; -import android.support.customtabs.CustomTabsIntent; +import androidx.browser.customtabs.CustomTabsIntent; import android.text.TextUtils; import com.droibit.android.customtabs.launcher.CustomTabsLauncher; @@ -180,7 +180,7 @@ public void openURL(String url, ReadableMap option, Promise promise) { customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } - + return customTabsIntent; }