(@NonNull Context context, @Nullable String url)
| 188 | } |
| 189 | |
| 190 | public static void openUrl(@NonNull Context context, @Nullable String url) |
| 191 | { |
| 192 | if (TextUtils.isEmpty(url)) |
| 193 | return; |
| 194 | |
| 195 | Uri uri = |
| 196 | isHttpOrHttpsScheme(url) ? Uri.parse(url) : new Uri.Builder().scheme("http").appendEncodedPath(url).build(); |
| 197 | |
| 198 | Utils.openUri(context, uri, R.string.browser_not_available); |
| 199 | } |
| 200 | |
| 201 | /** |
| 202 | * Attempts to open a URI in another app via the system app chooser. |
no test coverage detected