kgary / REACHv1

0 stars 5 forks source link

Export the data into .csv #7

Closed cdhekne closed 9 years ago

msmtms commented 9 years ago

Below is a code snippet to send a file through a share intent. You'll need to specify the file, and it has to be saved in external storage for the email application to access it.

Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain");

// ENTER THE EMAIL ADDRESS AND SUBJECT BELOW intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"email@asu.edu"}); intent.putExtra(Intent.EXTRA_SUBJECT, "Email Subject");

// ENTER THE FILE YOU WANT TO SEND BELOW intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File())); startActivity(Intent.createChooser(intent, "Share using"));

cdhekne commented 9 years ago

Done ! Thanks for the snippet Derek !