2017-06-16 145 views
0

是否可以將數據(如音頻文件)發送到WhatsApp或類似的佈局中?像「佈局」有些事情你分享關於WhatsApp的YouTube視頻時:在佈局中共享

enter image description here

我在想什麼,現在是,這也許不是與數據,但WhatsApp的或其他發出佈局應用程序會識別YouTube鏈接並將其自身添加到其中。它是否正確?

目前我分享音頻文件的代碼是常見的,看起來像這樣:

final String AUTHORITY = view.getContext().getPackageName() + ".fileprovider"; 

Uri contentUri = FileProvider.getUriForFile(view.getContext(), AUTHORITY, file); 

final Intent shareIntent = new Intent(Intent.ACTION_SEND); 
shareIntent.putExtra(Intent.EXTRA_STREAM, contentUri); 
shareIntent.setType("audio/mp3"); 
view.getContext().startActivity(Intent.createChooser(shareIntent, "Share sound via...")); 

回答

0

我不知道,但我不認爲它的工作原理。您可以通過WhatsApp發送文本。當你想通過WhatsApp發送文本時,也許這會有所幫助:https://faq.whatsapp.com/en/android/28000012
但是整個佈局或音頻...我不認爲我們有能力做到這一點。