2014-09-19 29 views
3

我有問題。Android分享文字鏈接使用意向LINE APP

我需要使用intent將鏈接文本分享給Android中的LINE App。

但我不知道如何將超鏈接文本分享給Line。

我知道將文本分享給LINE消息。如下:

intent.setAction(Intent.ACTION_SEND); 
intent = mContext.getPackageManager().getLaunchIntentForPackage(
              AppConfig.LINE_PACKAGE_NAME); 
intent.setType("text/plain"); 
intent.putExtra(Intent.EXTRA_TEXT, "this is share text but I want to set hyperlink"); 
mContext.startActivity(intent); 

有沒有人知道如何文本鏈接設置(例如:鏈接到www.google.com)在Android上使用意圖和分享LINE應用程序?

非常感謝。

+0

你能更新的答案? – AngelJanniee 2017-01-09 15:42:04

回答

1

我找到了答案。

只是寫超鏈接文本。

Line應用程序會自動在那裏的消息面板中生成超鏈接。

+0

你能更新正確答案嗎? – AngelJanniee 2017-01-09 09:52:28

0

您應該確切知道要發送的意圖和由LINE App識別的額外密鑰。你應該檢查LINE App開發API或公共服務

0

只是超鏈接添加到文本的結尾:

intent.putExtra(Intent.EXTRA_TEXT, "this is share text but I want to set hyperlink" + url);