Best code examples for Intent getStringExtra method (android.content.Intent.getStringExtra)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Intent getStringExtra method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Intent getStringExtra examples from Open Source projects
This code example shows how to use the following methods: getAction, getBundleExtra, getParcelableExtra, getStringExtra
47:	String action=intent.getAction(); 
-
61:	failure(intent, "Could not create interpreter: "+intent.getAction()); 
-
65:	success(intent, interpreter.executeScript(intent.getBundleExtra(BUNDLE))); 
-
111:	String broadcast=intent.getStringExtra(BROADCAST_ACTION); 
-
114:	PendingIntent pi=(PendingIntent)intent.getParcelableExtra(PENDING_RESULT); 
-
126:	data.setPackage(intent.getStringExtra(BROADCAST_PACKAGE)); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: getStringExtra
150:	final String registrationId = intent.getStringExtra(EXTRA_REGISTRATION_ID); 
151:	String error = intent.getStringExtra(EXTRA_ERROR); 
152:	String removed = intent.getStringExtra(EXTRA_UNREGISTERED); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getAction, getBundleExtra, getParcelableExtra, getStringExtra
47:	String action=intent.getAction(); 
-
61:	failure(intent, "Could not create interpreter: "+intent.getAction()); 
-
65:	success(intent, interpreter.executeScript(intent.getBundleExtra(BUNDLE))); 
-
111:	String broadcast=intent.getStringExtra(BROADCAST_ACTION); 
-
114:	PendingIntent pi=(PendingIntent)intent.getParcelableExtra(PENDING_RESULT); 
-
126:	data.setPackage(intent.getStringExtra(BROADCAST_PACKAGE)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getStringExtra, hasExtra
309:	return resultIntent.hasExtra(STATUS_ERROR_TYPE); 
-
317:	String type = resultIntent.getStringExtra(STATUS_ERROR_TYPE); 
318:	String description = resultIntent.getStringExtra(STATUS_ERROR_DESCRIPTION); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getStringExtra
63:	this.projectPath = intent.getStringExtra("projectPath"); 
64:	this.projectName = intent.getStringExtra("uploadName"); 
65:	this.projectDescription = intent.getStringExtra("projectDescription"); 
66:	this.token = intent.getStringExtra("token"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getParcelableExtra, getStringExtra
53:	String script=intent.getStringExtra(SCRIPT); 
-
83:	String broadcast=intent.getStringExtra(BROADCAST_ACTION); 
-
90:	PendingIntent pi=(PendingIntent)intent.getParcelableExtra(PENDING_RESULT); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getStringExtra
219:	String contents = intent.getStringExtra("SCAN_RESULT"); 
220:	String formatName = intent.getStringExtra("SCAN_RESULT_FORMAT"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getStringExtra
150:	final String registrationId = intent.getStringExtra(EXTRA_REGISTRATION_ID); 
151:	String error = intent.getStringExtra(EXTRA_ERROR); 
152:	String removed = intent.getStringExtra(EXTRA_UNREGISTERED); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getByteArrayExtra, getIntExtra, getStringExtra
335:	String contents = intent.getStringExtra("SCAN_RESULT"); 
336:	String formatName = intent.getStringExtra("SCAN_RESULT_FORMAT"); 
337:	byte[] rawBytes = intent.getByteArrayExtra("SCAN_RESULT_BYTES"); 
338:	int intentOrientation = intent.getIntExtra("SCAN_RESULT_ORIENTATION", Integer.MIN_VALUE); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getAction, getParcelableExtra, getStringExtra
59:	if (intent.getParcelableExtra(EXTRA_ONE_CLOUD) != null) { 
60:	oneCloudData = (OneCloudData) intent.getParcelableExtra(EXTRA_ONE_CLOUD); 
-
64:	if (intent.getAction().equals(ACTION_BOX_EDIT_FILE)) { 
-
67:	else if (intent.getAction().equals(ACTION_BOX_CREATE_FILE)) { 
-
70:	else if (intent.getAction().equals(ACTION_BOX_VIEW_FILE)) { 
-
73:	else if (intent.getAction().equals(ACTION_BOX_LAUNCH)) { 
-
76:	else if (intent.getAction().equals("com.android.vending.INSTALL_REFERRER")) { 
77:	final String referrer = intent.getStringExtra("referrer"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAction, getStringExtra
83:	String action = intent.getAction(); 
-
89:	onMessage(context, intent); 
-
118:	String registrationId = intent.getStringExtra(EXTRA_REGISTRATION_ID); 
119:	String error = intent.getStringExtra(EXTRA_ERROR); 
120:	String removed = intent.getStringExtra(EXTRA_UNREGISTERED); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getStringExtra
29:	if(!(intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER) != null 
30:	&& intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_RINGING) 
-
42:	Log.d(TAG, "Denied Incoming Call From: " + intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getStringExtra
215:	final String itemId = intent.getStringExtra(EXTRA_ITEM_ID); 
216:	final String developerPayload = intent.getStringExtra(EXTRA_DEVELOPER_PAYLOAD); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAction, getStringExtra
46:	if (intent.getAction().equals("com.google.android.c2dm.intent.REGISTRATION")) { 
-
48:	} else if (intent.getAction().equals("com.google.android.c2dm.intent.RECEIVE")) { 
-
56:	String registration = intent.getStringExtra("registration_id"); 
-
58:	if (intent.getStringExtra("error") != null) { 
-
60:	String error = intent.getStringExtra("error"); 
-
78:	} else if (intent.getStringExtra("unregistered") != null) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getStringExtra, resolveActivityInfo, toUri
154:	ActivityInfo ai = intent.resolveActivityInfo(pm, PackageManager.GET_ACTIVITIES); 
-
164:	return friendlyName != null || labelOnly ? friendlyName : intent.toUri(0); 
-
169:	String name = intent.getStringExtra(Intent.EXTRA_SHORTCUT_NAME); 
-
174:	return name != null ? name : intent.toUri(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getParcelableExtra, getStringExtra, putExtra, toUri
104:	mListener.shortcutPicked(data.toUri(0), getFriendlyActivityName(data, false), true); 
-
108:	Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT); 
-
110:	intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME)); 
111:	String appUri = intent.toUri(0); 
-
128:	return friendlyName != null || labelOnly ? friendlyName : intent.toUri(0); 
-
133:	String name = intent.getStringExtra(Intent.EXTRA_SHORTCUT_NAME); 
-
138:	return name != null ? name : intent.toUri(0); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getStringExtra, hasExtra
232:	if (!intent.hasExtra(name)) { 
-
236:	String result = intent.getStringExtra(name); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getIntExtra, getStringExtra, hasExtra
63:	if(intent.hasExtra(prefix+GEO_LATITUDE) && 
64:	intent.hasExtra(prefix+GEO_LONGITUDE)) 
-
66:	int lat = intent.getIntExtra(prefix+GEO_LATITUDE, 0); 
67:	int lon = intent.getIntExtra(prefix+GEO_LONGITUDE, 0); 
-
139:	final String name = intent.getStringExtra(GEO_NAME); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getBooleanExtra, getParcelableExtra, getStringExtra
309:	boolean noConnectivity = intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); 
310:	String reason = intent.getStringExtra(ConnectivityManager.EXTRA_REASON); 
311:	boolean isFailover = intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER, false); 
-
313:	NetworkInfo currentNetworkInfo = (NetworkInfo) intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); 
314:	NetworkInfo otherNetworkInfo = (NetworkInfo) intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); 
-
322:	log.info("EXTRA_EXTRA_INFO: " + intent.getStringExtra(ConnectivityManager.EXTRA_EXTRA_INFO)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getStringArrayExtra, getStringExtra
57:	this.packageNames = intent.getStringArrayExtra(EXTRA_PACKAGE_NAMES); 
-
60:	this.accountName = intent.getStringExtra(EXTRA_ACCOUNT_NAME); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getBooleanExtra, getIntExtra, getSerializableExtra, getStringExtra
65:	notificationId = intent.getIntExtra(BUNDLE_KEY_NOTIFICATION_ID, DEFAULT_ROBOSPICE_NOTIFICATION_ID); 
66:	requestClass = (Class<?>) intent.getSerializableExtra(BUNDLE_KEY_REQUEST_CLASS); 
-
70:	requestCacheKey = intent.getStringExtra(BUNDLE_KEY_REQUEST_CACHE_KEY); 
71:	spiceServiceClass = (Class<? extends SpiceService>) intent.getSerializableExtra(BUNDLE_KEY_SERVICE_CLASS); 
72:	foreground = intent.getBooleanExtra(BUNDLE_KEY_FOREGROUND, true); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: getParcelableExtra, getStringExtra
293:	finish((Intent) data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT), 
294:	data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAction, getIntExtra, getStringExtra
46:	String action = intent.getAction(); 
-
50:	int status = intent.getIntExtra("status", 0); 
51:	int health = intent.getIntExtra("health", 0); 
52:	int level = intent.getIntExtra("level", 0); 
53:	int plugged = intent.getIntExtra("plugged", 0); 
54:	int temperature = 
-
56:	String technology = 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getAction, getBooleanExtra, getStringExtra
55:	if (GTALK_DATA_MESSAGE_RECEIVED.equals(intent.getAction())) { 
56:	boolean fromTrustedServer = intent.getBooleanExtra("from_trusted_server", false); 
-
58:	String account = intent.getStringExtra("account"); 
59:	String token = intent.getStringExtra("message_token"); 
-
81:	intent.getAction())) { 
-
90:	} else if (SUBSCRIBED_FEEDS_REFRESH_ACTION.equals(intent.getAction())) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAction, getExtras, getStringExtra
44:	Bundle extras = intent.getExtras(); 
-
63:	GCMReceiver.completeWakefulIntent(intent); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getBooleanExtra, getStringExtra
29:	String playlist=intent.getStringExtra(EXTRA_PLAYLIST); 
30:	boolean useShuffle=intent.getBooleanExtra(EXTRA_SHUFFLE, false); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getBooleanExtra, getData, getExtras, getStringExtra
95:	final Uri data = intent.getData(); 
-
107:	Bundle originalExtras = intent.getExtras(); 
-
113:	mCreateDescrip = intent.getStringExtra(Intents.EXTRA_CREATE_DESCRIPTION); 
-
119:	mCreateForce = intent.getBooleanExtra(Intents.EXTRA_FORCE_CREATE, false); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getIntExtra, getSerializableExtra, getStringExtra
26:	int type = intent.getIntExtra("type", 0); 
27:	String accountId = intent.getStringExtra("accountId"); 
-
31:	MessageListBean value = (MessageListBean) intent.getSerializableExtra("value"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getIntExtra, getStringExtra
111:	String result=i.getStringExtra(PAYLOAD); 
112:	int resultCode=i.getIntExtra(RESULT_CODE, -1); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getBundleExtra, getIntExtra, getStringExtra
27:	final String fragclassname = launchIntent.getStringExtra(EXTRA_FRAGMENTNAME); 
28:	final Bundle fragargs = launchIntent.getBundleExtra(EXTRA_FRAGMENTARGS); 
29:	final int orient = launchIntent.getIntExtra(EXTRA_ORIENTATION, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getStringExtra, resolveActivityInfo, toUri
121:	ActivityInfo ai = intent.resolveActivityInfo(pm, PackageManager.GET_ACTIVITIES); 
-
131:	return (friendlyName != null) ? friendlyName : intent.toUri(0); 
-
136:	String name = intent.getStringExtra(Intent.EXTRA_SHORTCUT_NAME); 
-
141:	return name != null ? name : intent.toUri(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getParcelableExtra, getStringExtra
34:	String url = intent.getStringExtra("url"); 
35:	ResultReceiver receiver = intent.getParcelableExtra("receiver"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getStringExtra, hasExtra
105:	if (!intent.hasExtra(EXTRA_MESSAGE)) { 
-
110:	String message = intent.getStringExtra(EXTRA_MESSAGE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getBundleExtra, getStringExtra
53:	String authority = intent.getStringExtra(KEY_AUTHORITY); 
54:	Bundle extras = intent.getBundleExtra(KEY_USERDATA); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getBooleanExtra, getStringExtra, hasExtra, putExtra
37:	Intent modIntent = new Intent(super.getIntent()); 
38:	if (!modIntent.hasExtra(EXTRA_SHOW_FRAGMENT)) { 
39:	modIntent.putExtra(EXTRA_SHOW_FRAGMENT, WifiSettings.class.getName()); 
-
41:	modIntent.putExtra(EXTRA_NO_HEADERS, true); 
-
60:	if (orgIntent.hasExtra(EXTRA_PREFS_SHOW_BUTTON_BAR)) { 
-
62:	orgIntent.getBooleanExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false)); 
-
64:	if (orgIntent.hasExtra(EXTRA_PREFS_SET_NEXT_TEXT)) { 
-
66:	orgIntent.getStringExtra(EXTRA_PREFS_SET_NEXT_TEXT)); 
-
68:	if (orgIntent.hasExtra(EXTRA_PREFS_SET_BACK_TEXT)) { 
-
70:	orgIntent.getStringExtra(EXTRA_PREFS_SET_BACK_TEXT)); 
-
72:	if (orgIntent.hasExtra(EXTRA_WIFI_SHOW_ACTION_BAR)) { 
-
74:	orgIntent.getBooleanExtra(EXTRA_WIFI_SHOW_ACTION_BAR, true)); 
-
76:	if (orgIntent.hasExtra(EXTRA_WIFI_SHOW_MENUS)) { 
-
78:	orgIntent.getBooleanExtra(EXTRA_WIFI_SHOW_MENUS, true)); 
Full Snippet Info
3
CodeRank
Related Intent getStringExtra Questions & Answers:
Other Intent getStringExtra Examples
27:	
28:			Intent i = getIntent();
29:			String now_playing = i.getStringExtra("now_playing");
30:			String earned = i.getStringExtra("earned");
31:	
-
28:			Intent i = getIntent();
29:			String now_playing = i.getStringExtra("now_playing");
30:			String earned = i.getStringExtra("earned");
31:	
32:			// Diplaying the text

Read More

71:	        // Get album id, song id
72:	        Intent i = getIntent();
73:	        album_id = i.getStringExtra("album_id");
74:	        song_id = i.getStringExtra("song_id");
75:	        
-
72:	        Intent i = getIntent();
73:	        album_id = i.getStringExtra("album_id");
74:	        song_id = i.getStringExtra("song_id");
75:	        
76:	        // calling background thread

Read More

78:	        // Get album id
79:	        Intent i = getIntent();
80:	        album_id = i.getStringExtra("album_id");
81:	
82:			// Hashmap for ListView

Read More

12:	
13:	    final String payload =
14:	            launchIntent.getStringExtra(NextActivity.EXTRAS_PAYLOAD_KEY);
15:	    assertEquals("Payload is empty", LaunchActivity.STRING_PAYLOAD, payload);
16:	}

Read More

getStringExtra Method Overview
Retrieve extended data from the intent.
See Also