-1

In my application I want to use html file for attaching to the email client. So I want to access and update this html file at run time after that i added as an attachment. Is it possible?If yes, Please can anyone help me.

I've tried and created one html file in the assets folder after that I've added it as an attachment, but now i want to update it as at run time. I tried but i am not getting.

code

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);

emailIntent.setType("text/html");                                              
//attachment

Uri uri = Uri.fromFile(new File("file:///android_asset/YFG_Login.html"));
emailIntent.putExtra(android.content.Intent.EXTRA_STREAM, uri);                         
startActivity(Intent.createChooser(emailIntent, "Email:"));

thanks,

Naresh

Ahsan Khurshid
  • 9,383
  • 1
  • 33
  • 51
naresh
  • 10,332
  • 25
  • 81
  • 124

1 Answers1

0

Please use JavaMail API instead of the default/built-in app.

You can get more informations from answer

Community
  • 1
  • 1
wodong
  • 297
  • 2
  • 10