MCPcopy Create free account
hub / github.com/comaps/comaps / openUrl

Method openUrl

android/app/src/main/java/app/organicmaps/util/Utils.java:190–199  ·  view source on GitHub ↗
(@NonNull Context context, @Nullable String url)

Source from the content-addressed store, hash-verified

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.

Callers 9

openUrlMethod · 0.95
updateViewsMethod · 0.95
initTtsLangInfoLinkMethod · 0.95
onPreferenceTreeClickMethod · 0.95
onViewCreatedMethod · 0.95
initViewsMethod · 0.95
onCreateViewMethod · 0.95
onClickMethod · 0.95

Calls 5

isHttpOrHttpsSchemeMethod · 0.95
openUriMethod · 0.95
isEmptyMethod · 0.45
parseMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected