Similar function to Apple Continuity on Windows

529 Views Asked by At

I am converting an existing iPad app to Windows. One of the features in the iPad version is sharing data between devices using the new Continuity feature from Apple. It's very nicely integrated for 3rd party developers. You just give the data you are sending at one end and it comes out nicely on all connected devices.

I was wondering if there is anything similar available for Windows Store app developers?

1

There are 1 best solutions below

0
On

I don't know any API functions from Microsoft for sharing user input between devices. Take a look at this article, seems very interesting.

http://www.infoworld.com/article/2608926/mobile-technology/why-microsoft-and-google-can-never-copy-apple-s-handoff.html

What you can do to be ready for it when (and if) it happens, is to implement a protocol between your GUI actions and your view-controller. Even though it might seem just another layer between your view-controller and your actual view, it is very used for testing automation.

Simple example:

 private void Button1_click(object sender, EventArgs e)
 {
      // instead of putting your logic here, do something like:
      this.MyInputHandlerClass.Click('button1');
 }

Like I said, you can route as many events you want to this handler class. If you automate this to tests, you could have a class sequence that would do something like this, without really needing to create real OS click events, etc:

 private void TestCaseChangeUserSeetingColor(object windowReference)
 {
      MyInputHandlerClass testUI = new MyInputHandlerClass(windowReference);
      testUI.Click('button1');
      testUI.Click('button2');
      testUI.Click('buttonblue');
      Assert.IsFalse(this.Application.ColorSetting.IsBlue);
 }

If MS develop a Handoff system in the future, whatever they do (if seamlessly calling your events or having to create a bunch of classes and implementing it), you can call your objects in the correct manner without doing a lot of modifications in your application logic, just how your view-controllers handle user/os input/output.

You could write your own sharing protocol using this pattern too.