Create a control for Continue in different device Like Continue Reading etc. Microsoft wants us to build more connected app with Project Rome API. So it would be nice to create controls to achieve Microsoft's vision easily.
For Reference
I like the way MSPoweruser app has implemented this feature. In that app If we click Continue Reading button, it will show all the devices connected to this device. So if I click on a device it will open the app on that device with the same artice.
@Vijay-Nirmal Yes, it will be an amazing but we do not have a lot of visibility on the Microsoft vision. I mean, in term of UX. I think that the new Timeline feature can handle a lot of use cases.
@Odonno But 'Continue in different device' control will be useful. Timeline feature will only show what you have used in this device and other devices. But we can keep this(Continue in different device) control inside the app so that if the user clicks the button the app will automatically open in the corresponding device in the same spot where the user left off.
Not sure if there is much to build there in terms of a control, as it would be mostly app specific code to match the format of the content by implementing the deep linking/app service. The Remote System APIs are already fairly straightforward to use.
@nmetulev
RemoteLauncher.LaunchUriAsyncIf we do this then it's just two lines of code to achieve this feature.
Yes, I think we should provide a more efficient code/way to use the Project Rome API on UWP even if I did not take a look at the API for the moment but I am sure it is interesting to provide some useful class/methods/anything around it if it adds value.
@Vijay-Nirmal Please be aware that I did not talk about "control" as (1) I don't know if it should be done because I assume every app will use their own UI and (2) the OS should take care of it.
Anyway, I suggest you to raise an issue here https://wpdev.uservoice.com/forums/110705-universal-windows-platform/category/193402-uwp-community-toolkit so we can see the trend.
@Vijay-Nirmal , what do you envision the value for part 2 to be? Are you envisioning this helper/control to also handle the protocol activation on the other side?
@nmetulev
Are you envisioning this helper/control to also handle the protocol activation on the other side?
If it is possible then Yes. But I highly doubt it is possible. If we can do it then it will make 'Continue in different device' easier to implement.
ControlName.CreateURIProtocol(ProtocolName) //Use App Logo as Logo and App name as Display Name
ControlName.LaunchUriAsync(SelectedDevice, URI)
Also, we should make easier to navigate to a specific Page while launching through URI. Currently, It is a tedious process to navigate to a specific Page by override void OnActivated(IActivatedEventArgs args) in App.xaml.cs, setting the Frame to navigate and override void OnNavigatedTo(NavigationEventArgs e) to get the URI to that Page.
If we can do ControlName.LaunchUriAsync(SelectedDevice, URI, FrameToNavigateWhileOpening) this it will be easy for developers to implement this feature.
I like the first part of the idea, to provide a picker control for the devices (maybe call it RemoteDevicePicker). Every app that supports remote launching would need to have something like this, so IMHO this is exactly what this toolkit is made for. A device filter could be set through a property, so only supported devices will appear. The control would then show the list of devices and fire an event when a device was selected.
The second part, for the actual launching and navigation, I do not think that this is something that the toolkit can provice. Every app is different, every app has other navigation systems. It is not possible to create a solution that would work in even nearly all apps. The toolkit provides the DeepLinkParser to simplify decoding of the deep link (get page name and parameters). But the actual navigation has to happen in the app, it is not something that can be put in the toolkit. There are a lot of navigation frameworks available like Prism, MVVMLight and probably a lot of others. So if you want to simplify navigation in your app, you have a lot of possibilities already. Using one of these frameworks will also simplify remote launch scenarios.
I had project rome implemented in my app Stack 10 but i converted this to a Custom Control. If anyone is intrested to test this, I can post a repo and you can check if it fits Toolkit.
Please do :)
@nmetulev WOI.
ping @Code-ScottLe as he might be able to assist here as well.
@Code-ScottLe This is the Repo where i implemented the control. I created a branch on my Fork where i will update the control in sample app. Please provide me any inputs that you think will make the control more easier to use.
Also these changes are already on my VS TFS project. If you want to check it there let me know and i will add you to the project there.
@avknaidu Give me a few days, Kinda swamped ATM.
@nmetulev I created a Content dialog that can be called as a Device picker.
RemoteDevicePicker remoteDevicePicker = new RemoteDevicePicker()
{
Title = "Pick Remote Device",
DeviceListSelectionMode = ListViewSelectionMode.Extended
};
remoteDevicePicker.RemoteDevicePickerClosed += RemoteDevicePicker_RemoteDevicePickerClosed;
await remoteDevicePicker.ShowAsync();
private async void RemoteDevicePicker_RemoteDevicePickerClosed(object sender, RemoteDevicePickerEventArgs e)
{
await new MessageDialog(e.Devices.Count.ToString()).ShowAsync();
}
Only concern here is you can use this as a control inside a page or even extend a new ContentDialog from this class ( Which is fine i guess ). Is there a way we can restrict the dev not doing this? Basically It should work just like ShareUI in the center of the screen to select an option.
Link to Project Repo Here
@nmetulev is there still interest in this feature? I can do a PR with the control and we can discuss further there.
@avknaidu Yes! Sorry for disappearing off the issue, I was really taken away in the last few months both at work and at being a good human (more responsibilities now, for good reasons (: ), but anyway, please send in the PR! Last time I checked your project repo, it was solid.
Agreed, let's get this done :)
I am just waiting on one of my PR to be approved. As soon as it is merged, i will push this PR.
What is the current status?
@gbarcho It will be released in next update (Most likely). Follow #2126 for updates
Closing this issue with the merge of #2126
Most helpful comment
ping @Code-ScottLe as he might be able to assist here as well.