mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-26 01:27:42 +00:00
parent
e9b0ea6558
commit
bdb7b5e45a
6 changed files with 22 additions and 7 deletions
|
|
@ -113,7 +113,9 @@ public class KMPBrowserActivity extends BaseActivity {
|
|||
|
||||
// All links that aren't internal Keyman keyboard links open in user's browser
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
|
||||
startActivity(intent);
|
||||
if (intent.resolveActivity(getPackageManager()) != null) {
|
||||
startActivity(intent);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (lowerURL.startsWith("keyman:")) {
|
||||
|
|
|
|||
|
|
@ -160,7 +160,9 @@ public final class KeyboardSettingsActivity extends AppCompatActivity {
|
|||
Bundle args = kbd.buildDownloadBundle();
|
||||
Intent i = new Intent(getApplicationContext(), KMKeyboardDownloaderActivity.class);
|
||||
i.putExtras(args);
|
||||
startActivity(i);
|
||||
if (i.resolveActivity(getPackageManager()) != null) {
|
||||
startActivity(i);
|
||||
}
|
||||
finish();
|
||||
|
||||
// "Help" link clicked
|
||||
|
|
|
|||
|
|
@ -762,10 +762,15 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
// Launch PlayStore to update Chrome
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.android.chrome"));
|
||||
startActivity(intent);
|
||||
if (intent.resolveActivity(getPackageManager()) != null) {
|
||||
startActivity(intent);
|
||||
}
|
||||
} catch (android.content.ActivityNotFoundException e) {
|
||||
// Link to Chrome if user is not signed in to Play Store
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.android.chrome")));
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.android.chrome"));
|
||||
if (intent.resolveActivity(getPackageManager()) != null) {
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -136,7 +136,9 @@ public final class KeyboardInfoActivity extends BaseActivity {
|
|||
} else {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(customHelpLink));
|
||||
startActivity(i);
|
||||
if (i.resolveActivity(getPackageManager()) != null) {
|
||||
startActivity(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,7 +252,9 @@ final class FVShared {
|
|||
String helpUrl = String.format("%s%s", FVKeyboardHelpLink, id);
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(helpUrl));
|
||||
localContext.startActivity(i);
|
||||
if (i.resolveActivity(getPackageManager()) != null) {
|
||||
localContext.startActivity(i);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateActiveKeyboardsList() {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,9 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardDownloa
|
|||
}
|
||||
else {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(i);
|
||||
if (i.resolveActivity(getPackageManager()) != null) {
|
||||
startActivity(i);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue