有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

JavaMSAL安卓。AuthenticationActivity完成,但用于身份验证请求的线程池线程仍处于等待状态

由于线程等待条件,acquireToken中的回调方法[3rd param]未被调用

交互式身份验证。身份验证和授权成功。返回有效的重定向URL这个。finish()在返回调用程序中调用:

交互请求。java:在AuthenticationActivity完成后不会调用此方法

static synchronized void onActivityResult(int requestCode, int resultCode, final Intent data) {
    Logger.info(TAG, null, "Received request code is: " + requestCode + "; result code is: " + resultCode);

onActivityResult未被调用,线程处于等待状态。已将回调方法传递到publicClientApplication中。acquireToken({three arg重载})未被调用。示例应用程序未收到验证流已完成的通知,也未关闭登录活动

Screen cap from Android Studio debugger showing locked thread pool thread after auth token received

身份验证活动。爪哇

private void returnToCaller(final int resultCode, final Intent data) {
    Logger.info(TAG, null, "Return to caller with resultCode: " + resultCode + "; requestId: " + mRequestId);
    data.putExtra(Constants.REQUEST_ID, mRequestId);

    if (null != mUiEventBuilder) {
        Telemetry.getInstance().stopEvent(mTelemetryRequestId, mUiEventBuilder);
    }

    **setResult(resultCode, data);
    this.finish();**
}

应用程序渐变配置示例

  • 渐变版本4.4
  • Android插件版本3.1.0

模块构建。渐变内容

    compileSdkVersion 25
buildToolsVersion '27.0.3'

defaultConfig {
    applicationId "com.microsoft.graph.snippets"
    minSdkVersion 21
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "安卓.support.test.runner.AndroidJUnitRunner"
    javaCompileOptions {
        annotationProcessorOptions {
            includeCompileClasspath false
        }
    }

}

dependencies {
implementation ('com.microsoft.identity.client:msal:0.1.1'){
    exclude group: 'com.安卓.support', module: 'appcompat-v7'
}

implementation 'com.安卓.volley:volley:1.0.0'
implementation 'com.安卓.support:support-fragment:25.1.0'
implementation 'com.安卓.support:appcompat-v7:25.1.0'

// Butterknife
implementation 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'

implementation 'com.microsoft.graph:msgraph-sdk-安卓:1.1.0'

implementation 'joda-time:joda-time:2.9.4'

implementation 'com.google.guava:guava:19.0'

// Test libraries
安卓TestImplementation 'com.安卓.support:support-annotations:25.1.0'
//noinspection GradleCompatible
安卓TestImplementation 'com.安卓.support.test:runner:1.0.1'
安卓TestImplementation 'com.安卓.support.test:rules:0.5'
安卓TestImplementation 'com.安卓.support.test.espresso:espresso-core:2.2.2'
安卓TestImplementation 'com.安卓.support.test.espresso:espresso-intents:2.2.2'
安卓TestImplementation 'com.安卓.support.test.espresso:espresso-web:2.2.2'

}


共 (0) 个答案