0
我想創建一個選項在我的應用程序共享一個HTML生成的頁面WhatsApp &電子郵件,但我似乎無法使它與格式分享(表不是加工)。安卓 - 分享HTML到WhatsApp和電子郵件
是否有可能在WhatsApp和Email中使用CSS共享HTML和格式化HTML?
另一件事是,當彈出窗口要求什麼應用程序共享,我可以限制分享什麼應用程序。是否有可能讓某些應用程序擁有不同的數據共享,例如WhatsApp &電子郵件獲取HTML格式的數據,但SMS獲取純文本?
我目前正在使用的代碼是:提前
dis = Html.fromHtml(html).toString();
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("text/html");
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Share With?");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, dis);
if (sharingIntent.resolveActivity(this.getPackageManager()) != null)
{
this.startActivity(Intent.createChooser(sharingIntent, "Share With?"));
}
else
{
toast("No Sharable Apps Found!");
}
感謝。
好感謝您的幫助 –