Search code examples
uwpwindows-10-mobilewindows-10-universal

Enabling a UWP app for Continuum, but NOT regular phone use


I'm the developer of this app which is just a wrapper for a website. It seems to be well-received, and I've had a lot of folks ask me if I could make it available for W10M as well so they can use it on Continuum.

I don't have anything against this, and I could flip the switch in the Store right now and make it happen, but I'm a little worried about people who download it to their non-Continuum phones and get mad that they can't scan the QR code to register with WhatsApp Web... because, y'know, the camera is on one side of their phone and the screen is on the other. :)

How should I handle this? Is there a convenient way for me to determine they're on a phone and not using Continuum? I guess ideally I'd like to use responsive design to display a message, but I'm open for any ideas on how to handle this scenario.


Solution

  • So you can't really have it on Continuum and not phone.

    But I guess a workaround (albeit a poor one really) you could do with visual states is make the visual state be the size of the desktop application, and then check in the code behind what visual state group the application is in and then get that vs what device you're on.

    so: VisualStateGroupName.CurrentState.Name == "Desktop" (or whatever you named the state).

    vs: AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Mobile" (or other values).

    Or just make in the state groups anything smaller than expected (like a phone size) hide everything and say it's "not supported".. though not really a good user experience.

    Best case would be to support the phone, and since I'm not sure what your project does it's hard to say how to implement that but you're question was how to use on continuum but not phone.