Code example for Intent

Methods: createChooserputExtrasetType

    static Context context;
    /* Deliver some data to someone else 
    static void send(String mimeType, String filename, String subject, String text, String chooser_title) {
        Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
        /** tryied with String [] emails, but hard to code the whole C/Cython part. 
          if (emails != null) 
          emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, emails); 
        if (subject != null)
            emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
        if (text != null)
            emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, text);
        if (filename != null)
            emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+ filename));
        if (chooser_title == null)
            chooser_title = "Send mail";
        context.startActivity(Intent.createChooser(emailIntent, chooser_title));