2016-05-27 18 views

回答

1

亚历克斯与Branch.io这里:

你肯定能!当你配置你的ShareSheetStyle对象,只需设置WHATS_APP作为首选共享选项,就像这样:

ShareSheetStyle shareSheetStyle = new ShareSheetStyle(MainActivity.this, "My Sharing Message Title", "My Sharing message body") 
     .setCopyUrlStyle(getResources().getDrawable(android.R.drawable.ic_menu_send), "Save this URl", "Link added to clipboard") 
     .setMoreOptionStyle(getResources().getDrawable(android.R.drawable.ic_menu_search), "Show more") 
     .addPreferredSharingOption(SharingHelper.SHARE_WITH.WHATS_APP); 

,将放在了WhatsApp在列表的顶部,如果它安装在设备上。

+0

我正在使用Cordova/Ionic。你能帮忙吗? @Alex Bauer –

+0

@SandeshBSuvarna这不是我们在Cordova SDK中表现的方法。我在Cordova/Ionic平台上不太流利,但我相信如果您定制底层SDK,它应该可以工作。看看[本节](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/6ce246fe880ddc4ec2417768fc8a2d3ec1941f09/src/android/io/branch/BranchSDK.java#L411-L418 ),让我知道它是怎么回事! –