Android ActivityNotFoundException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ActivityNotFoundException class.

This code example shows how to use the following methods:printStackTrace
This code example shows how to use the following methods:getMessage
		APGintent.putExtra(FileDecryptionActivity.EXTRA_DATA, data);
 
		try { 
			startActivityForResult(APGintent, DECRYPT_MESSAGE);
		} catch (ActivityNotFoundException e) {
			Log.e("MobileOrg", "Error: " + e.getMessage()
					+ " while launching APG intent"); 
		} 
	} 
     
	@Override 
	public void onActivityResult(int requestCode, int resultCode, Intent intent) {
		switch (requestCode) {
		case FileDecryptionActivity.DECRYPT_MESSAGE:
			if (resultCode != RESULT_OK || intent == null)
				return; 
 
			String decryptedData = intent
					.getStringExtra(FileDecryptionActivity.EXTRA_DECRYPTED_MESSAGE);
			BufferedReader reader = new BufferedReader(new InputStreamReader(
6
CodeRank
This code example shows how to use the following methods:getMessage
														try { 
														    Intent i = new Intent(Intent.ACTION_VIEW);  
														    i.setData(Uri.parse(url));  
														    context.startActivity(i);
														} catch (ActivityNotFoundException ex) {
															Toast.makeText(context, ex.getMessage() + " for " + url, Toast.LENGTH_LONG).show();
														} 
													} 
												}); 
												builder.setNegativeButton(cancelButton, null);
												builder.show();
 
												return false; 
											} 
										}); 
								cat.addPreference(preference);
							} 
						} 
					}); 
				} 
6
CodeRank
This code example shows how to use the following methods:e, getMessage
	Uri data = Uri.parse(fileToPlay/*"file:///sdcard/abc_xyz.mp3"*/);
	intent.setDataAndType(data, "audio/mp3");
	try { 
	    startActivity(intent);
	} catch (ActivityNotFoundException e) {
	    Log.e(TAG, e.getMessage(), e);
	} 
 
	finish();
    } 
} 
5
CodeRank
This code example shows how to use the following methods:getMessage
			MainActivity.Rule.initVotes(); 
 
			Intent intent = new Intent(this, VoteActivity.class);
			startActivity(intent);
		} catch (ActivityNotFoundException e) {
			Log.e(Tag, e.getMessage());
		} 
	} 
} 
4
CodeRank
This code example shows how to use the following methods:getMessage
                        RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
                intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "音声認識");
                intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1);
                startActivityForResult(intent, REQUEST_CODE);
            } catch (ActivityNotFoundException e) {
                Toast.makeText(RecognizeTo.this, e.getMessage(), Toast.LENGTH_LONG).show();
            } 
        } else if (view == btnSend) {
            Intent intent = new Intent(Intent.ACTION_SEND);
            intent.setType("text/plain");
            intent.putExtra(Intent.EXTRA_TEXT, editText.getText().toString());
            startActivity(intent);
        } 
    } 
 
    @Override 
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
            String resStr = "";
            ArrayList<String> results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
4
CodeRank
This code example shows how to use the following methods:getMessage
		Log.i(Tag, "onClickOkButton");
		try { 
			Intent intent = new Intent(this, NightActivity.class);
			startActivity(intent);
		} catch (ActivityNotFoundException e) {
			Log.e(Tag, e.getMessage());
		} 
	} 
} 
4
CodeRank
This code example shows how to use the following methods:printStackTrace
		try { 
			Intent intent = new Intent(this,
					com.mz.videorec.sipua.ui.Settings.class); 
			startActivity(intent);
		} catch (ActivityNotFoundException e) {
			e.printStackTrace();
		} 
	} 
 
	private void startVideo() { 
		try { 
			Intent intent = new Intent(this,
					com.mz.videorec.sipua.ui.VideoCamera.class); 
			startActivity(intent);
		} catch (ActivityNotFoundException e) {
			e.printStackTrace();
		} 
 
	} 
 
4
CodeRank
This code example shows how to use the following methods:printStackTrace
                        "com.mobisystems.msdict.viewer.ArticleActivity")); 
            context.startActivity(i);
        } catch (ActivityNotFoundException ex) {
            Toast.makeText(context, "Cambridge dictionary not installed",
                        Toast.LENGTH_SHORT).show();
            ex.printStackTrace();
        } 
    } 
 
    public static void openLongmanDict(Context context, String word) {
        try { 
            Intent i = new Intent(Intent.ACTION_VIEW);
            i.setData(Uri.parse("word=" + Uri.encode(word)));
            i.putExtra("word", word);
            i.setComponent(new ComponentName("com.mobifusion.android.ldoce5",
                        "com.mobifusion.android.ldoce5.WordActivity")); 
            context.startActivity(i);
        } catch (ActivityNotFoundException ex) {
            Toast.makeText(context, "Longman dictionary not installed",
                        Toast.LENGTH_SHORT).show();
4
CodeRank
This code example shows how to use the following methods:getMessage
		 * else if (pref.getKey().equals(SOUND_USER_KEY)) { i.setType(SOUND_MIME_TYPE); requestCode = CHOOSE_SOUND_REQUEST; } 
		 */ 
		try { 
			startActivityForResult(i, requestCode);
		} catch (ActivityNotFoundException e) {
			Log.w(TAG, e.getMessage());
		} 
		return (true); 
	} 
 
	@Override 
	public void onActivityResult(int requestCode, int resultCode, Intent data) {
		if ((resultCode == Activity.RESULT_OK) && (requestCode == CHOOSE_IMAGE_REQUEST) && (data != null)) {
			String imagePath = NyanUtil.uriToFilePath(getBaseContext(), data.toUri(0));
			if (imagePath != null) {
				findPreference(BG_IMAGE_KEY).getEditor().putString(BG_IMAGE_KEY, imagePath).commit();
			} 
		} 
		return; 
	} 
4
CodeRank

Related Android ActivityNotFoundException Questions & Answers:

See Code Examples for Android ActivityNotFoundException Methods: