diff --git a/Source/Immutable/Immutable_UPL_Android.xml b/Source/Immutable/Immutable_UPL_Android.xml index 816c4246..a8d6c3e3 100644 --- a/Source/Immutable/Immutable_UPL_Android.xml +++ b/Source/Immutable/Immutable_UPL_Android.xml @@ -18,6 +18,16 @@ -keep interface androidx.** { *; } + + + android { + compileOptions { + sourceCompatibility 1.8 + targetCompatibility 1.8 + } + } + + diff --git a/Source/Immutable/Private/Immutable/Android/Java/CustomTabsController.java b/Source/Immutable/Private/Immutable/Android/Java/CustomTabsController.java index 49584a95..c73bbf96 100644 --- a/Source/Immutable/Private/Immutable/Android/Java/CustomTabsController.java +++ b/Source/Immutable/Private/Immutable/Android/Java/CustomTabsController.java @@ -111,14 +111,17 @@ public void launch(@NonNull final Uri uri) { context.startActivity(new Intent(Intent.ACTION_VIEW, uri)); } else { // Running in a different thread to prevent doing too much work on main thread - new Thread(() -> { - try { - launchCustomTabs(context, uri); - } catch (ActivityNotFoundException ex) { - // Failed to launch Custom Tab browser, so launch in browser - context.startActivity(new Intent(Intent.ACTION_VIEW, uri)); - } - }).start(); + new Thread(new Runnable() { + @Override + public void run() { + try { + launchCustomTabs(context, uri); + } catch (ActivityNotFoundException ex) { + // Failed to launch Custom Tab browser, so launch in browser + context.startActivity(new Intent(Intent.ACTION_VIEW, uri)); + } + } + }).start(); } }