I have created a file explorer and a separate app with an editText to display some data. But how do I send the filepath back? I have stored the filepath in a string variable.
            Asked
            
        
        
            Active
            
        
            Viewed 100 times
        
    1
            
            
        - 
                    pass the string back in setResult as you specified – SweetWisher ツ Feb 20 '14 at 04:53
1 Answers
1
            
            
        You can use startActivityForResult:
Intent intent=new Intent(MainActivity.this,SecondActivity.class);  
startActivityForResult(intent, 2);// 
To pass result back :
 Intent returnIntent = new Intent();
 returnIntent.putExtra("result",path_string);
 setResult(RESULT_OK, returnIntent);     
 finish();
For more explanation, see the example
 
    
    
        SweetWisher ツ
        
- 7,296
- 2
- 30
- 74
 
    