mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Normalize scheme for URL on Android (#21561)
Summary: Android requires lowercase for URL scheme. This commit https://github.com/facebook/react-native/commit/d00bdb9bb8b9b11bce900689c7e28cebd2eb0807 fixed it but on React Native side. Because it is Android specific, it should be fixed on Android side. Android has method to normalize url scheme: https://developer.android.com/reference/android/net/Uri.html#normalizeScheme() Pull Request resolved: https://github.com/facebook/react-native/pull/21561 Differential Revision: D10287868 Pulled By: hramos fbshipit-source-id: f5e474164fdb2cfd49bd8ee51da17de3f1341a9c
This commit is contained in:
committed by
Facebook Github Bot
parent
9965ea5a2e
commit
4b6f02ea75
@@ -79,7 +79,7 @@ public class IntentModule extends ReactContextBaseJavaModule {
|
||||
|
||||
try {
|
||||
Activity currentActivity = getCurrentActivity();
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url).normalizeScheme());
|
||||
|
||||
String selfPackageName = getReactApplicationContext().getPackageName();
|
||||
ComponentName componentName = intent.resolveActivity(
|
||||
|
||||
Reference in New Issue
Block a user