Skip to content

Set of libraries that help you to build dual screen experiences for Microsoft Surface Duo

License

Notifications You must be signed in to change notification settings

microsoft/surface-duo-sdk

Folders and files

NameName
Last commit message
Last commit date
Sep 27, 2022
Jun 17, 2022
Mar 1, 2022
Oct 19, 2021
Jul 25, 2022
Jul 25, 2022
Jun 17, 2022
Sep 27, 2022
Jun 9, 2022
May 27, 2022
Jun 17, 2022
Jun 17, 2022
Sep 27, 2022
Jul 29, 2020
May 7, 2020
May 7, 2020
May 7, 2020
May 7, 2020
Jul 25, 2022
May 7, 2020
Jan 27, 2022
Sep 27, 2022
May 7, 2020
Dec 9, 2020
May 7, 2020
Oct 19, 2021
Dec 7, 2021
Sep 27, 2022

Repository files navigation

Surface Duo SDK

This repo contains the source code for the Microsoft Surface Duo SDK.

Please read the code of conduct and contribution guidelines.

Getting Started

When importing the code into Android Studio, use the surface-duo-sdk folder as the base directory of the project. This lets you access the sdk source code and run the sdk samples from within the same project.

Add to your project

  1. Make sure you have mavenCentral() repository in your top level build.gradle file:

    allprojects {
        repositories {
            google()
            mavenCentral()
         }
    }
  2. Add dependencies to the module-level build.gradle file (current version may be different from what's shown here). There are multiple libraries available - for some of them you should reference ScreenManager plus any additional libraries you plan to use:

    ScreenManager

    If you want to choose the version that uses Display Mask API, then you should add the following lines to your gradle file.

    implementation "com.microsoft.device.dualscreen:screenmanager-displaymask:1.0.0-beta4"

    or if you want to choose the version that uses Window Manager API, then you should add the following lines.

    implementation "com.microsoft.device.dualscreen:screenmanager-windowmanager:1.0.0-beta4"

    Bottom navigation

    implementation "com.microsoft.device.dualscreen:bottomnavigation:1.0.0-beta5"

    Fragments handler

    implementation "com.microsoft.device.dualscreen:fragmentshandler:1.0.0-beta5"

    Layouts

    implementation "com.microsoft.device.dualscreen:layouts:1.0.0-beta9"

    Tabs

    implementation "com.microsoft.device.dualscreen:tabs:1.0.0-beta5"

    RecyclerView

    implementation "com.microsoft.device.dualscreen:recyclerview:1.0.0-beta6"

    Ink

    implementation "com.microsoft.device:ink:1.0.0-alpha5"

    Foldable Navigation Component

    def nav_version = "1.0.0-alpha3"
    
    // Java language implementation
    implementation "com.microsoft.device.dualscreen:navigation-fragment:$nav_version"
    implementation "com.microsoft.device.dualscreen:navigation-ui:$nav_version"
    
    // Kotlin
    implementation "com.microsoft.device.dualscreen:navigation-fragment-ktx:$nav_version"
    implementation "com.microsoft.device.dualscreen:navigation-ui-ktx:$nav_version"

    SnackbarContainer

    implementation "com.microsoft.device.dualscreen:snackbar:1.0.0-alpha2"

    Testing

    implementation "com.microsoft.device.dualscreen.testing:testing-kotlin:1.0.0-alpha4"

Useful links

Samples that utilize this SDK

Other Surface Duo developer samples