显示Viber的,在的WhatsUp的Windows Phone 8.1分成合约 [英] Show Viber, Whatsup in Windows Phone 8.1 share contract

查看:191
本文介绍了显示Viber的,在的WhatsUp的Windows Phone 8.1分成合约的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在开发,在通过在Windows Phone的8.1股股份的合同图片的应用程序。我的代码是

Hi I am developing an app that shares a picture in via Share contract in Windows Phone 8.1. My code is

DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();
dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.DataRequested);

private async void DataRequested(DataTransferManager sender, DataRequestedEventArgs args)
{
    DataRequest request = args.Request;
    request.Data.Properties.Title = "Unscramble this";
    request.Data.Properties.Description = "";
    request.Data.SetText(string.Format("Scrambled word is {0} and clue is {1}. Help me to unscramble this \r\n(via Unscramble Plus for Windows Phone)",scrambledString.ToUpper(),selectedMeanings.ToUpper()));
    DataRequestDeferral deferral = request.GetDeferral();

    // Make sure we always call Complete on the deferral.
    try
    {
        //StorageFile logoFile = await Package.Current.InstalledLocation.GetFileAsync("Assets\\Logo.png");

        StorageFile imagefile = await KnownFolders.PicturesLibrary.GetFileAsync("pic.png");
        List<IStorageItem> storageItems = new List<IStorageItem>();
        storageItems.Add(imagefile);
        request.Data.SetStorageItems(storageItems);
    }
    finally
    {
        deferral.Complete();
    } 
}



如果这显示为下面的分成合约(仅包括脸谱,邮件应用程序)

where this show the share contract as below (including only Facebook, Mail apps)

但是,如果你在Sendtiment应用程序请参阅Windows Phone(的 http://www.windowsphone.com/en-us/store/app/sendtiment-cards/9c389cc5-5c00-4f8e-8bd4-e6fbb5040c24 )它显示了许多应用程序,如Viber的,WhatsApp的,微博。

But if you see in Sendtiment app for Windows Phone (http://www.windowsphone.com/en-us/store/app/sendtiment-cards/9c389cc5-5c00-4f8e-8bd4-e6fbb5040c24) it shows many apps like Viber, Whatsapp, Twitter.

如何获得这些Viber的,WhatsApp的像我的应用程序的分成合约的应用

How to get these Viber, Whatsapp like apps in my app's share contract?

编辑:(加)当我删除
request.Data.SetText(的String.Format(炒字{0}和线索为{1}。\r\\\
(通过解读加为Windows手机),scrambledString。 ToUpper的(),selectedMeanings.ToUpper()));
线,这显示OneDrive。

(Addition) When I remove request.Data.SetText(string.Format("Scrambled word is {0} and clue is {1}. \r\n(via Unscramble Plus for Windows Phone)",scrambledString.ToUpper(),selectedMeanings.ToUpper())); line, this shows OneDrive.

推荐答案

http://channel9.msdn.com/Series/Building-Apps-for-Windows-Phone-8-1/10

这可能帮助,也请确保您分享什么样的数据,因为该应用程序将只显示如果内容类型匹配,

this might help, also make sure what kind of data you are sharing, as the app will show only if the Content type matches,

例如WhatsApp的将只显示如果您正在共享视频,图片但不是电话联系。

for example whatsapp will show only if you are sharing Video,Images but NOT phone contact.

这篇关于显示Viber的,在的WhatsUp的Windows Phone 8.1分成合约的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆