获取访问令牌但不允许登录

时间:2016-10-01 07:27:09

标签: android oauth-2.0 gmsmapview

所以我的一个伙伴正在帮我测试我的应用程序。但是,在他获得允许或拒绝屏幕后,即使我们获得了访问代码,也不会让他实际登录应用程序。当我在他的Samsung Galaxy S6 Edge上运行应用程序时,运行对话框中会显示以下错误:

09/30 20:25:23: Launching MainActivity
$ adb push C:\Users\James Singleton\AndroidStudioProjects\ChffrAPI\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.jamessingleton.chffrapi
$ adb shell pm install -r "/data/local/tmp/com.example.jamessingleton.chffrapi"
    pkg: /data/local/tmp/com.example.jamessingleton.chffrapi
Success


$ adb shell am start -n "com.example.jamessingleton.chffrapi/com.example.jamessingleton.chffrapi.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 1082 on device samsung-sm_g925t-1115fb9dddda2805
E/Zygote: v2
I/SELinux: Function: selinux_compare_spd_ram, index[1], SPD-policy is existed. and_ver=SEPF_SECMOBILE_6.0.1 ver=11
W/SELinux: Function: selinux_compare_spd_ram, index[1], priority [2], priority version is VE=SEPF_SECMOBILE_6.0.1_0013
E/Zygote: accessInfo : 0
I/libpersona: KNOX_SDCARD checking this for 10248
I/libpersona: KNOX_SDCARD not a persona
W/SELinux: SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=com.example.jamessingleton.chffrapi 
I/art: Late-enabling -Xcheck:jni
D/TimaKeyStoreProvider: TimaSignature is unavailable
D/ActivityThread: Added TimaKeyStore provider
I/InjectionManager: Inside getClassLibPath + mLibMap{0=, 1=}
W/ResourcesManager: getTopLevelResources: /data/app/com.example.jamessingleton.chffrapi-1/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.example.jamessingleton.chffrapi
D/ResourcesManager: For user 0 new overlays fetched Null
I/InjectionManager: Inside getClassLibPath caller 
W/System: ClassLoader referenced unknown path: /data/app/com.example.jamessingleton.chffrapi-1/lib/arm64
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
D/InjectionManager: InjectionManager
D/InjectionManager: fillFeatureStoreMap com.example.jamessingleton.chffrapi
I/InjectionManager: Constructor com.example.jamessingleton.chffrapi, Feature store :{}
I/InjectionManager: featureStore :{}
W/ResourcesManager: getTopLevelResources: /data/app/com.example.jamessingleton.chffrapi-1/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.example.jamessingleton.chffrapi
W/ResourcesManager: getTopLevelResources: /data/app/com.example.jamessingleton.chffrapi-1/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.example.jamessingleton.chffrapi
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
W/ResourcesManager: getTopLevelResources: /data/app/com.google.android.gms-2/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.google.android.gms
D/ResourcesManager: For user 0 new overlays fetched Null
I/InjectionManager: Inside getClassLibPath caller 
W/ResourcesManager: getTopLevelResources: /data/app/com.google.android.gms-2/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.google.android.gms
D/ResourcesManager: For user 0 new overlays fetched Null
I/InjectionManager: Inside getClassLibPath caller 
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/0000000a/n/arm64-v8a
W/nAnnotationIntrospector: Unable to load JDK7 annotation types; will have to skip
I/System.out: Connection Preference: wifi
D/Activity: performCreate Call Injection manager
I/InjectionManager: dispatchOnViewCreated > Target : com.example.jamessingleton.chffrapi.MainActivity isFragment :false
D/SecWifiDisplayUtil: Metadata value : SecSettings2
D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{b22bf4b I.E...... R.....ID 0,0-0,0}
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
D/libEGL: loaded /vendor/lib64/egl/libGLES_mali.so
D/libEGL: eglInitialize EGLDisplay = 0x7fa3b3f178
I/OpenGLRenderer: Initialized EGL, version 1.4

                  [ 09-30 20:25:36.141  1082: 1182 D/         ]
                  ro.exynos.dss isEnabled: 0
D/mali_winsys: new_window_surface returns 0x3000,  [1440x2560]-format:1
I/InjectionManager: dispatchCreateOptionsMenu :com.example.jamessingleton.chffrapi.MainActivity
I/InjectionManager: dispatchPrepareOptionsMenu :com.example.jamessingleton.chffrapi.MainActivity
D/libGLESv1: DTS_GLAPI : DTS is not allowed for Package : com.example.jamessingleton.chffrapi
D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
I/System.out: com.example.jamessingleton.chffrapi.AuthPreferences@2af7be6
E/AuthApp: ya29.Ci9vAy3YMsGUZcVJ28kRIh5lMQMYhbSUSelWfYABrGmSWkKXKgUhRC_A4KJJcnJtBQ
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@6065402 time:27457508
D/ViewRootImpl: ViewPostImeInputStage processPointer 0
D/ViewRootImpl: ViewPostImeInputStage processPointer 1
V/ActivityThread: updateVisibility : ActivityRecord{23821be token=android.os.BinderProxy@6065402 {com.example.jamessingleton.chffrapi/com.example.jamessingleton.chffrapi.MainActivity}} show : true
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@6065402 time:27522831
D/ViewRootImpl: ViewPostImeInputStage processPointer 0
D/ViewRootImpl: ViewPostImeInputStage processPointer 1
V/ActivityThread: updateVisibility : ActivityRecord{23821be token=android.os.BinderProxy@6065402 {com.example.jamessingleton.chffrapi/com.example.jamessingleton.chffrapi.MainActivity}} show : true

我不确定这是什么意思。如果我使用给定的访问令牌,我可以使用oAuth 2.0 playground并按正常方式继续。

1 个答案:

答案 0 :(得分:0)

因此用户未连接到他的首选连接。他的首选连接是I/System.out: Connection Preference: wifi,他与4G连接。我添加了以下内容来检查它:

else {
                    Toast.makeText(getApplicationContext(), "You are not connected to your preferred connection." + "\n" +
                            "Please connect to your preferred connection to continue."
                            , Toast.LENGTH_LONG).show();
                }