microsoftgraph / msgraph-sdk-android

Microsoft Graph SDK for Android! https://graph.microsoft.io
Other
51 stars 43 forks source link

Context (ApplicationContext) instead of Application? #90

Closed WiMank closed 4 years ago

WiMank commented 6 years ago

I am trying use this in a WorkManager. A WorkManager getApplicationContext() can not be cast to an Application. Why can't msgraph-sdk-android use the more generic "Context" instead of "Application"? Or is there some other solution about which nothing is written here?


authenticationAdapter = new MSAAuthAndroidAdapter(getApplication()) {
            @Override
            public String getClientId() {
                return "1111111-11111-1111-11111-1111111";
            }

            @Override
            public String[] getScopes() {
                return new String[]{
                        "https://graph.microsoft.com/Files.ReadWrite",
                        "offline_access"
                };
            }
        };
baywet commented 4 years ago

Hi everyone, Thank you for the contribution, we have moved away from an android specific SDK to a Java SDK and this repo will be archived very soon. If you're still facing the same issue with the Java SDK, feel free to re-open an issue over there. Closing.