I have a DB. It has 3 tables.
I am working on activity which has a feature to export table from DB and send to email.
When i click on the Export function:
Task 1 . It has to make a .csv file of table 2 .
Task 2. Then in the activity screen, i need to show the .csv file as attached object(like insert obj feature of Excel) . The page need to show the attached file icon.
Task 3. When i type the email id and Click send. It had to send the file to the email.
To do this , my initial investigation i found.
1 . for Task 1, i can use opencsv jar file. But i am not sure how to make csv of only table 2.
-
For task 2, I am not sure how to show the attached .csv file on the screen like an icon
-
For task 3, I hope I can use the
Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Person Details"); sendIntent.putExtra(Intent.EXTRA_STREAM, u1); sendIntent.setType("text/html"); startActivity(sendIntent);
Am i correct. Kindly help me for Task 1 and Task 2 specifically.
Aucun commentaire:
Enregistrer un commentaire