This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This activity gets notified about the completion of the ADAL activity through this method. | |
* @param requestCode The integer request code originally supplied to startActivityForResult(), | |
* allowing you to identify who this result came from. | |
* @param resultCode The integer result code returned by the child activity through its | |
* setResult(). | |
* @param data An Intent, which can return result data to the caller (various data | |
* can be attached to Intent "extras"). | |
*/ | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We're not using Microsoft Intune's Company portal app, | |
// skip the broker check. | |
AuthenticationSettings.INSTANCE.setSkipBroker(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Devices with API level lower than 18 must setup an encryption key. | |
if (Build.VERSION.SDK_INT < 18 && AuthenticationSettings.INSTANCE.getSecretKeyData() == null) { | |
AuthenticationSettings.INSTANCE.setSecretKey(generateSecretKey()); | |
} | |
/** | |
* Randomly generates an encryption key for devices with API level lower than 18. | |
* @return The encryption key in a 32 byte long array. | |
*/ | |
protected byte[] generateSecretKey() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. | |
* Portions of this class are adapted from the AuthenticationController.java file from Microsoft Open Technologies, Inc. | |
* located at https://github.com/OfficeDev/Office-365-SDK-for-Android/blob/master/samples/outlook/app/src/main/java/com/microsoft/services/controllers/AuthenticationController.java | |
*/ | |
package com.microsoft.office365.connect; | |
import android.app.Activity; | |
import android.util.Log; |
NewerOlder