I am looking for an answer to the question that how can we give the result to the application which started my application. I have reffered to many tutorials but they were useless... Any help will be welcomed.
            Asked
            
        
        
            Active
            
        
            Viewed 496 times
        
    1 Answers
0
            Intent returnIntent = new Intent();
returnIntent.putExtra("result",result); 
setResult(RESULT_OK,returnIntent);
finish();   
Source: How to manage `startActivityForResult` on Android?
Intent i = new Intent();
i.setAction(Intent.ACTION_EDIT);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_TEXT,"Just some text");
startActivity(i);
 
    
    
        Community
        
- 1
- 1
 
    
    
        An SO User
        
- 24,612
- 35
- 133
- 221
- 
                    Hi there can you help me in one more topic i.e. setting the type of intent using setType() – Priyank Oct 19 '14 at 06:49
- 
                    Okay. `setType()` lets you specify the MIME type of the data that is contained in the intent. Plain text has a MIME type of `text/plain`. Have a look: http://www.sitepoint.com/web-foundations/mime-types-complete-list/ – An SO User Oct 19 '14 at 06:51
- 
                    Can you send me an example .... not a big one but just the matter in setType(____) – Priyank Oct 19 '14 at 06:55
- 
                    Suppose my intent uses the MIME type text/plain the how to define that using setType() thats the question – Priyank Oct 19 '14 at 07:00
- 
                    
