android- How to access and update HTML file
Posted
by
naresh
on Stack Overflow
See other posts from Stack Overflow
or by naresh
Published on 2012-08-28T09:35:51Z
Indexed on
2012/08/28
9:38 UTC
Read the original article
Hit count: 328
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.
Here i tried like first i created one html file in the assets folder after that i 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
© Stack Overflow or respective owner