microsoftconnect/ms-intune-app-sdk-android

how to apply this SDK for flutter app? please guide to use

lunar232 opened this issue · 1 comments

Feature Request

Questions to Ask Before Submission

  1. Have you checked the Microsoft Intune App SDK for Android repository for a similar feature request?
  2. Are you using the latest version of the SDK and Plugin?

Summary

Hello. I have a flutter app for Android and iOS
I want to use intune MAM feature for my app.
but i can't find intune flutter SDK.

so I will try this SDK for my flutter app.
please guide me how to apply for flutter app this SDK.
(my flutter app has webview with angular frontend and MSAL js library)

Thank you

Reason For Request

to know apply this sdk for flutter with webview

@lunar232

We started to work on it with this guide:
https://learn.microsoft.com/en-us/mem/intune/developer/app-sdk-android-phase3

Using the files located here:
https://github.com/msintuneappsdk/ms-intune-app-sdk-android/tree/master/GradlePlugin
https://github.com/msintuneappsdk/ms-intune-app-sdk-android/blob/master/Microsoft.Intune.MAM.SDK.aar

Unfortunately the way proposed in the guide didn't help us and we had to import the files manually modifying the build.gradle files

Steps:
Ensure that the build.gradle located at the android folder contains:
inside the repositories section:

        flatDir {
            dirs 'libs'
        }

And this inside the dependencies section

        // START: Microsoft Intune SDK
        classpath "org.javassist:javassist:3.29.2-GA"
        classpath files("app/libs/com.microsoft.intune.mam.build.jar")
        // END: Microsoft Intune SDK

Once you have done that changes move out to the build.gradle located at the app folder and apply the plugin

// START: Microsoft Intune
apply plugin: 'com.microsoft.intune.mam'
// END: Microsoft Intune

After that in the same file, update the dependencies section adding

    implementation files("libs/Microsoft.Intune.MAM.SDK.aar")

This is only for android, iOS has another implementation.

Consider to update the AndroidManifest according to your needs, that means accomplish the MSAL prerequisite described here:
https://learn.microsoft.com/en-us/mem/intune/developer/app-sdk-android-phase2

Hope it helps!