List of usage examples for android.content ActivityNotFoundException printStackTrace
public void printStackTrace()
From source file:com.chale22.ico01.fragments.FragmentContact.java
private void actWeb() { Uri weburiString = Uri.parse(getString(R.string.web_link)); Intent webIntent = new Intent("android.intent.action.VIEW", weburiString); try {//from w w w . java 2s . co m startActivity(webIntent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.atwal.wakeup.battery.util.Utilities.java
public static void startActivitySafely(Context context, Intent intent) { try {/* ww w. ja v a 2s.c om*/ context.startActivity(intent); } catch (ActivityNotFoundException e) { } catch (SecurityException e) { } catch (Exception e) { e.printStackTrace(); } }
From source file:com.bringcommunications.etherpay.ReceiveActivity.java
private void do_share_guts() { Intent share = new Intent(Intent.ACTION_SEND); share.setType("image/*"); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); qr_bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes); String path = null;// www . j av a 2 s .c om try { path = MediaStore.Images.Media.insertImage(getContentResolver(), qr_bitmap, "QR Code", null); if (path == null) { //turns out there's an Android bug, where it happens when the user hasn't taken a photo on the device before (i.e. gallery is empty //and hasn't been initialized.). The workaround is to initialize the photo directory manually: File sdcard = Environment.getExternalStorageDirectory(); if (sdcard != null) { File mediaDir = new File(sdcard, "DCIM/Camera"); if (!mediaDir.exists()) mediaDir.mkdirs(); } path = MediaStore.Images.Media.insertImage(getContentResolver(), qr_bitmap, "QR Code", null); } } catch (Exception e) { } if (path == null) { String msg = getResources().getString(R.string.receive_err_no_media_access_msg); Toast.makeText(this, msg, Toast.LENGTH_LONG).show(); return; } Uri imageUri = Uri.parse(path); share.putExtra(Intent.EXTRA_STREAM, imageUri); if (show_private) share.putExtra(Intent.EXTRA_TEXT, private_key); else share.putExtra(Intent.EXTRA_TEXT, acct_addr); try { startActivity(Intent.createChooser(share, "Select")); } catch (android.content.ActivityNotFoundException ex) { ex.printStackTrace(); } }
From source file:it.rignanese.leo.slimfacebook.MessagesActivity.java
@Override public void onExternalPageRequest(String url) { try {/*ww w. j av a 2 s .c om*/ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); } catch (ActivityNotFoundException e) {//this prevents the crash Log.e("shouldOverrideUrlLoad", "" + e.getMessage()); e.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentExtras.java
private void actGithub() { Uri extras1uriString = Uri.parse(getString(R.string.github_link)); //use this to link to your UCCW skins on Play or Website Intent extras1Intent = new Intent("android.intent.action.VIEW", extras1uriString); try {/*from w ww. j ava2 s . c o m*/ startActivity(extras1Intent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentExtras.java
private void actRootzwiki() { Uri extras1uriString = Uri.parse(getString(R.string.rootzwiki_link)); //use this to link to your UCCW skins on Play or Website Intent extras1Intent = new Intent("android.intent.action.VIEW", extras1uriString); try {//from w w w.j av a2 s. co m startActivity(extras1Intent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentExtras.java
private void actXDA() { Uri extras1uriString = Uri.parse(getString(R.string.xda_link)); //use this to link to your UCCW skins on Play or Website Intent extras1Intent = new Intent("android.intent.action.VIEW", extras1uriString); try {/*from w w w . j a v a 2s .c om*/ startActivity(extras1Intent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentExtras.java
private void actUCCW() { Uri uccwuriString = Uri.parse(getString(R.string.uccw_link)); Intent uccwIntent = new Intent("android.intent.action.VIEW", uccwuriString); try {// ww w .ja va2s. c om startActivity(uccwIntent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentExtras.java
private void actZooper() { Uri zooperuriString = Uri.parse(getString(R.string.zooper_link)); Intent zooperIntent = new Intent("android.intent.action.VIEW", zooperuriString); try {// w w w . j a va 2 s. c om startActivity(zooperIntent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }
From source file:com.chale22.ico01.fragments.FragmentExtras.java
private void actExtras1() { Uri extras1uriString = Uri.parse(getString(R.string.extras1_link)); //use this to link to your UCCW skins on Play or Website Intent extras1Intent = new Intent("android.intent.action.VIEW", extras1uriString); try {/*from ww w .j a v a 2s. c om*/ startActivity(extras1Intent); } catch (ActivityNotFoundException e2) { e2.printStackTrace(); } }