小编P t*_*P t的帖子

意识API。获取某些手机上的location.failure

Awareness.SnapshotApi.getLocation(client)
    .setResultCallback(new ResultCallback<LocationResult>() {
        @Override
        public void onResult(@NonNull LocationResult locationResult) {
            if (locationResult.getStatus().isSuccess()) {

            }

        }
    }).addOnFailureListener(new OnFailureListener() {
        @Override
            public void onFailure(@NonNull Exception e) {
                String error = e.getMessage();
            }
Run Code Online (Sandbox Code Playgroud)

com.google.android.gms.common.api.ApiException:17:API:ContextManager.API在此设备上不可用。

在Android 9必需手机上运行该应用程序时,我收到此错误作为例外,但在Android 8 Samsung s8上运行时,我也不例外。

我已经更新到最新的16.0.0意识包。

android google-api google-awareness android-8.0-oreo android-9.0-pie

8
推荐指数
1
解决办法
228
查看次数