Sharing custom data from one app to another app RRS feed

  • Question

  • Hello everyone.

    After seeing demo of File and data sharing in windows phone 8.1 runtime.I am trying to send one custom data object from one app to anothe app.

    Class InformationClass


    int id;

    string name;


    InformationClass is custom class and i want to transfer this class object to another application via DataTransferManager.

    May be like this ..

    InformationClass obj = new InformationClass();



    Now i want to send obj Object from one app to another app.

    Referred link :


    Friday, August 1, 2014 10:20 AM

All replies

  • There are sample links at the bottom of that page you posted:

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, August 1, 2014 12:29 PM
  • Hey i go through detail about it but when i tried with my object structure (InformationClass) then it will give me exception.

    referenced code.

    void dataTransfer_DataRequested(DataTransferManager sender, DataRequestedEventArgs args)
                    DataRequest request = args.Request;
                    InformationClass data = new InformationClass();
                    data.id = "1";
                    data.Text = SearchTerm.Text;

                    DataPackage dp = new DataPackage();
                    dp.SetData("infoData", data);

                catch (Exception ex)
                    string errorMessage = ex.Message;

    Monday, August 4, 2014 12:31 PM