jjzjj

GooglePlayServicesUtil

全部标签

android - GooglePlayServicesUtil 错误对话框按钮不执行任何操作

我正在向我的应用添加一个MapFragment并具有以下代码,改编自map教程:privatebooleanservicesConnected(){//CheckthatGooglePlayservicesisavailableintresultCode=GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);//IfGooglePlayservicesisavailableif(ConnectionResult.SUCCESS==resultCode){//Indebugmode,logthestatusLog.d("Lo

java - 找不到方法 com.google.android.gms.common.GooglePlayServicesUtil

我知道这个问题已经有很多答案和修复......但对我来说没有任何效果......我正在尝试将推送通知添加到我的Android应用程序中。为此,我使用了“google-play-services_lib”和“google-play-services.jar”。我遵循了谷歌提供的教程SettingUpGooglePlayServices用于Eclipse。我做了什么:在Eclipse中使用SDK管理器安装Googleplay服务将现有的Android代码导入工作区(/android-sdks/extras/google/google_play_services/libproject/goo

android - requestCode 只能使用低 16 位(Google play 服务)

我遇到了错误IllegalArgumentException:Canonlyuselower16bitsforrequestCode当我在我的应用中按下EnableGooglePlayServices时。我的代码是privatebooleancheckPlayServices(){intresultCode=GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);Log.d("resultCode",String.valueOf(resultCode));if(resultCode!=ConnectionResult.SUC

android - GooglePlayServicesUtil.isGooglePlayServicesAvailable() 崩溃

我在2.1版移动设备上运行它。当我调试它时,我发现函数GooglePlayServicesUtil.isGooglePlayServicesAvailable()崩溃了。据说“找不到方法android.util.Base64.decode”。2.1版本太低?还是手机需要安装googleplay服务?代码如下:intstatus=GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());if(status!=ConnectionResult.SUCCESS){...}这是日志:07-2321:56:40.

java - Android 8 或更高版本 : Check for Google Play Services

此方法一直返回0。根据开发者文档,如果设备安装了最新版本的googleplay,此方法应该返回类似SUCCES的内容。有人知道如何使用它吗?@OverridepublicvoidonResume(){super.onResume();GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());System.out.println("henkie:"+GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationConte

Android GooglePlayServicesUtil.getErrorDialog() 不显示对话框

我正在尝试在使用之前检查GooglePlayServicesAPK的可用性。我有一个包已过期的设备(日志显示为“...GooglePlay服务已过期。需要3225100但找到3136134”)。下面的代码将处理这种情况并显示一个对话框提示用户进行更新。出于我不知道的原因这条线GooglePlayServicesUtil.getErrorDialog(resultCode,this,PLAY_SERVICES_RESOLUTION_REQUEST).show();立即返回,不显示对话框(并且不会在UI事件上阻塞UI线程)。能否请您说明可能发生的情况以及如何纠正代码为了显示对话框?@Ove

android - 如何在 Android 上设置 Google Play 服务错误的样式

在Android上使用新的GoogleMapsV2API时,如果用户的设备没有安装GooglePlay(服务)应用程序,用户将看到一条错误消息。我想知道是否有可能以某种方式覆盖此错误消息的样式以使其不那么刺耳并更适合应用程序样式。这是错误的样子: 最佳答案 经过一些调查,我确定最好的解决方案是手动检查GooglePlay服务库是否存在并显示自定义错误对话框或错误布局。GooglePlayServicesUtil中有一些实用方法这使得这相当简单。publicvoidonCreate(BundlesavedInstanceState){

android - GooglePlayServicesUtil.getErrorDialog 为空

我正在使用ACRA(arca.ch)生成自动错误报告。我刚刚使用GoogleMapsAndroidAPIv2发布了我的应用程序的新版本。我在尝试显示GooglePlayServicesUtil.getErrorDialog返回的对话框时收到EEEPad和TransformerPad用户报告的错误。有谁知道为什么会发生这种情况?这是acra报告的相关代码和Logcat:调用此行时:intresultCode=GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);if(resultCode!=ConnectionResult.

android - GooglePlayServicesUtil.getErrorDialog 为空

我正在使用ACRA(arca.ch)生成自动错误报告。我刚刚使用GoogleMapsAndroidAPIv2发布了我的应用程序的新版本。我在尝试显示GooglePlayServicesUtil.getErrorDialog返回的对话框时收到EEEPad和TransformerPad用户报告的错误。有谁知道为什么会发生这种情况?这是acra报告的相关代码和Logcat:调用此行时:intresultCode=GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);if(resultCode!=ConnectionResult.

Android Drive GooglePlayServicesUtil:指定账号无法登录

我需要使用DriveAPI创建一个文件,其中包含我的应用程序中的一些内容,因此我遵循了DriveAPI网页上的“入门”部分。所以我在我的开发者控制台上启用了api,创建了一个OAuth客户端ID,正如它所说的那样。(如果我还没有支付2美元,我可以使用api吗?)关于我正在执行的onCreate方法的设置Activity:googleApiClient=newGoogleApiClient.Builder(this).addApi(Drive.API).addScope(Drive.SCOPE_FILE).addConnectionCallbacks(this).addOnConnect