List of usage examples for android.content ActivityNotFoundException printStackTrace
public void printStackTrace()
From source file:com.proofhq.Open.java
/** * Creates an intent for the data of mime type * * @param path/* w ww .j a v a 2s.co m*/ * @param callbackContext */ private void chooseIntent(String path, CallbackContext callbackContext) { if (path != null && path.length() > 0) { try { Uri uri = Uri.parse(path); String mime = getMimeType(path); Intent fileIntent = new Intent(Intent.ACTION_VIEW); if (Build.VERSION.SDK_INT > 15) { fileIntent.setDataAndTypeAndNormalize(uri, mime); // API Level 16 -> Android 4.1 } else { fileIntent.setDataAndType(uri, mime); } cordova.getActivity().startActivity(fileIntent); callbackContext.success(); } catch (ActivityNotFoundException e) { e.printStackTrace(); callbackContext.error(1); } } else { callbackContext.error(2); } }
From source file:com.by_syk.lib.nanoiconpack.dialog.ApplyDialog.java
private void apply2Smart() { Intent intent = new Intent("ginlemon.smartlauncher.setGSLTHEME"); intent.putExtra("package", getContext().getPackageName()); try {/*w w w.j av a 2 s . co m*/ getContext().startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } }
From source file:com.by_syk.lib.nanoiconpack.dialog.ApplyDialog.java
private void apply2Action3() { Intent intent = getContext().getPackageManager().getLaunchIntentForPackage("com.actionlauncher.playstore"); intent.putExtra("apply_icon_pack", getContext().getPackageName()); try {//from w ww . j a v a 2 s .co m getContext().startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } }
From source file:com.by_syk.lib.nanoiconpack.dialog.ApplyDialog.java
private void apply2Apex() { Intent intent = new Intent("com.anddoes.launcher.SET_THEME"); intent.putExtra("com.anddoes.launcher.THEME_PACKAGE_NAME", getContext().getPackageName()); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); try {/*from w ww.j av a2 s . c o m*/ getContext().startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } }
From source file:com.by_syk.lib.nanoiconpack.dialog.ApplyDialog.java
private void apply2Adw() { Intent intent = new Intent("org.adw.launcher.SET_THEME"); intent.putExtra("org.adw.launcher.theme.NAME", getContext().getPackageName()); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); try {//from w ww . ja v a 2 s . c o m getContext().startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } }
From source file:com.by_syk.lib.nanoiconpack.dialog.ApplyDialog.java
private void apply2Nova() { Intent intent = new Intent("com.teslacoilsw.launcher.APPLY_ICON_THEME"); intent.setPackage("com.teslacoilsw.launcher"); intent.putExtra("com.teslacoilsw.launcher.extra.ICON_THEME_TYPE", "GO"); intent.putExtra("com.teslacoilsw.launcher.extra.ICON_THEME_PACKAGE", getContext().getPackageName()); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); try {/* w w w .ja v a 2s . c om*/ getContext().startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentContact.java
private void actGPlus() { Uri gplusuriString = Uri.parse(getString(R.string.gplus_link)); Intent gplusIntent = new Intent("android.intent.action.VIEW", gplusuriString); try {/*from w w w . ja v a 2 s .c o m*/ startActivity(gplusIntent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentContact.java
private void actTwitter() { Uri twitteruriString = Uri.parse(getString(R.string.twitter_link)); Intent twitterIntent = new Intent("android.intent.action.VIEW", twitteruriString); try {//from w w w . j a va2 s . c o m startActivity(twitterIntent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentContact.java
private void actFacebook() { Uri facebookuriString = Uri.parse(getString(R.string.facebook_link)); Intent facebookIntent = new Intent("android.intent.action.VIEW", facebookuriString); try {/*from w w w. j a v a 2s . c o m*/ startActivity(facebookIntent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentContact.java
private void actEmail() { Uri emailuriString = Uri.parse(getString(R.string.email_link)); Intent emailIntent = new Intent("android.intent.action.VIEW", emailuriString); try {/*from ww w . jav a2 s . co m*/ startActivity(emailIntent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }