Intent getStringExtra - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Intent getStringExtra method.

This code example shows how to use the following methods: getAction, getBundleExtra, getParcelableExtra, getStringExtra
    super("InterpreterService"); 
  } 
   
  @Override 
  protected void onHandleIntent(Intent intent) {
    String action=intent.getAction();
    I_Interpreter interpreter=interpreters.get(action);  
     
    if (interpreter==null) {
      try { 
        interpreter=(I_Interpreter)Class.forName(action).newInstance();
        interpreters.put(action, interpreter);
      } 
      catch (Throwable t) {
        Log.e("InterpreterService", "Error creating interpreter", t);
      } 
    } 
     
    if (interpreter==null) {
      failure(intent, "Could not create interpreter: "+intent.getAction());

9
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getStringExtra
 
    } 
     
     
    private void handleRegistration(final Context context, Intent intent) {
        final String registrationId = intent.getStringExtra(EXTRA_REGISTRATION_ID);
        String error = intent.getStringExtra(EXTRA_ERROR);
        String removed = intent.getStringExtra(EXTRA_UNREGISTERED);
 
        if (Log.isLoggable(TAG, Log.DEBUG)) {
            Log.d(TAG, "dmControl: registrationId = " + registrationId +
                ", error = " + error + ", removed = " + removed);
        } 
 
        if (removed != null) {
            // Remember we are unregistered 
            C2DMessaging.clearRegistrationId(context);
            onUnregistered(context);
            return; 
        } else if (error != null) {
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getAction, getBundleExtra, getParcelableExtra, getStringExtra
    super("InterpreterService"); 
  } 
   
  @Override 
  protected void onHandleIntent(Intent intent) {
    String action=intent.getAction();
    I_Interpreter interpreter=interpreters.get(action);  
     
    if (interpreter==null) {
      try { 
        interpreter=(I_Interpreter)Class.forName(action).newInstance();
        interpreters.put(action, interpreter);
      } 
      catch (Throwable t) {
        Log.e("InterpreterService", "Error creating interpreter", t);
      } 
    } 
     
    if (interpreter==null) {
      failure(intent, "Could not create interpreter: "+intent.getAction());

8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getStringExtra, hasExtra
                    .putExtra(EXTRA_WRITE_PRIVACY, ensureDefaultAudience(audience));
        return validateKatanaActivityIntent(context, intent);
    } 
 
    public static boolean isErrorResult(Intent resultIntent) {
        return resultIntent.hasExtra(STATUS_ERROR_TYPE);
    } 
 
    public static Exception getErrorFromResult(Intent resultIntent) {
        if (!isErrorResult(resultIntent)) {
            return null; 
        } 
 
        String type = resultIntent.getStringExtra(STATUS_ERROR_TYPE);
        String description = resultIntent.getStringExtra(STATUS_ERROR_DESCRIPTION);
 
        if (type.equalsIgnoreCase(ERROR_USER_CANCELED)) {
            return new FacebookOperationCanceledException(description);
        } 
        /* TODO parse error values and create appropriate exception class */ 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getStringExtra
	} 
 
	@Override 
	public int onStartCommand(Intent intent, int flags, int startID) {
		int returnCode = super.onStartCommand(intent, flags, startID);
		this.projectPath = intent.getStringExtra("projectPath");
		this.projectName = intent.getStringExtra("uploadName");
		this.projectDescription = intent.getStringExtra("projectDescription");
		this.token = intent.getStringExtra("token");
		this.serverAnswer = "";
		this.result = true;
		this.notificationId = intent.getIntExtra("notificationId", 0);
 
		return returnCode;
	} 
 
	@Override 
	public void onCreate() { 
		super.onCreate(); 
	} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

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 Code Examples for other Android Intent Methods: