Nov 08 2020 12:55 PM
I am new to Xamarin & Android, coming from a UWP background. I would like to see a video or step-by-step tutorial that includes:
1. Project configuration changes necessary for apps optimized for Surface Duo, including:
The Xamarin.DuoSdk NuGet package
App Configuration, such as Properties, AssemblyInfo.cs, & AndroidManifest.xml
2. Standard code changes
Any Attributes in codebehind files (such as MainActivity.cs)
Adding commonly implemented event handlers for dual-screen apps (such as when an app is spanned or unspanned)
Adjustments in UI files (such as activity_main.xml) that are often used for dual-screen apps (such as an appropriate place to put TwoPaneView)
Like I said, I am new to both Xamarin and Android, but I think most developers will have an easier time optimizing their apps for Surface Duo & dual screen once they are confident the basics are set up (since like everything else, it's easy to forget certain hidden things you didn't need before). I also think it would be nice if there was a Surface Duo Xamarin.Android Template in Visual Studio 2019 (possibly as part of the Xamarin.DuoSdk NuGet package).
Nov 09 2020 09:55 AM
Hi @njsokalski and welcome onboard :)
Just as a lesson learned videos are outdated as soon as they get published. Thr SDK is IMHO still rapidly evolving.
I can recommand you the samples section (https://docs.microsoft.com/en-us/dual-screen/xamarin/samples).
Also the "Use the SDK" provides a simple getting started with all you need, including the first event handler (https://docs.microsoft.com/en-us/dual-screen/xamarin/use-sdk).
If you have any other question, let us know!
Nov 16 2020 11:18 AM
@njsokalski you might be interested in Microsoft Learn.
There is a dual-screen module, which is part of a series on Xamarin.Forms. Following these modules will help you understand the basics of Android and Xamarin.Forms, as well as the specifics of developing for the Surface Duo.
Jan 16 2021 05:08 AM
Did you have any luck to get started with Microsoft Surface Duo development? If not, maybe we can assist you :).
Jan 16 2021 07:41 AM
@tscholzeI sort of threw the Duo part on the back burner for a while as we wait for MAUI near the end of 2021. I have a lot of learning to do before I'd be able to efficiently use a lot of the stuff, so I decided to work more on the basics of Xamarin, since the other stuff will probably be easier to understand and more useful if I do that first. And hopefully there will be more templates for dual-screen stuff in the future as well, so right now I am sort of "practicing" as I make my transition from UWP to Xamarin.Forms & hopefully, at some point, MAUI. Thank you for your help.
Jan 16 2021 09:12 AM
Sounds like a great idea. I hope that MAUI will be production ready with version 1 but I think it is as always "wait and see" how many iterations wie have to wait until we can move from Forms to Maui and if there will be a Duo SDK.
Have fun!