- // Try the intent.
- try {
- // Show the chooser.
- activity.startActivity(openIntent);
- } catch (ActivityNotFoundException exception) { // There are no apps available to open the URL.
- // Show a snackbar with the error.
- Snackbar.make(noSwipeViewPager, activity.getString(R.string.error) + " " + exception, Snackbar.LENGTH_INDEFINITE).show();
- }