草庐IT

request_contact

全部标签

android - Google Maps API V2 'Failed to Load Map. Could not contact Google Servers',即使我检查权限和 keystore

我关注guide创建一个谷歌地图示例,但它总是抛出以下错误。E/GoogleMapsAndroidAPI(27821):Failedtoloadmap.CouldnotcontactGoogleservers.权限READ_GSERVICES以及调试和发布keystore已经过测试。他们也无法解决上述问题。谁能告诉我为什么会抛出该错误?list文件:Java文件:packagecom.where.common;importandroid.os.Bundle;importandroid.app.Activity;importandroid.view.Menu;publicclassMai

java - Android OkHttp 库 : GET Request - Exception EOFException:\n not found: size=0 content=

我在我的应用程序OkHttp库(http://square.github.io/okhttp/)中使用,在一个简单的GET请求中我得到了这个异常:Causedby:java.io.EOFException:\nnotfound:size=0content=...atokio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:201)atcom.squareup.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:191)...u

android - 谷歌位置 API : request location updates with pending intent?

我已经开始使用thistutorial实现GoogleLocationAPI.我已经设法让它在我的应用程序中正常工作,它会以正确的时间间隔更新我的位置等。现在我正在研究如何在设备处于sleep模式时更新我的​​位置。根据documentation,这种方法是要走的路:publicvoidrequestLocationUpdates(LocationRequestrequest,PendingIntentcallbackIntent);我的问题是,如何设置此PendingIntent,以及如何处理它?我看过有关如何处理其他类型Intent的教程,但我不确定如何将它们应用到此。

安卓 6 棉花糖 : requests for some specific permissions are instantly denied with no ui shown

使用官方AVD版本。3这样调用:ActivityCompat.requestPermissions(activity,newString[]{"android.permission.USE_CREDENTIALS"},REQUEST_PERMISSION_CREDENTIALS);立即触发:onRequestPermissionsResult(intrequestCode,String[]permissions,int[]grantResults)结果代码是PackageManager.PERMISSION_DENIED谁有解决办法?更新:已知受影响:Manifest.permissi

android - 如何使用google contacts api以编程方式将手机联系人同步到android中的gmail

如何使用GoogleAPI将Androidnative联系人同步到Google帐户。提供一些有用的链接。 最佳答案 同步会自动发生。您可以通过编程方式添加或删除联系人。但是,当且仅当用户在手机设置中启用了“同步联系人”选项时,操作系统才会自动处理同步。但是,如果用户使用如下方式启用了同步,则可以运行可以调用同步过程的同步例程:privatevoidrequestSync(){AccountManageram=AccountManager.get(this);Account[]accounts=am.getAccounts();for

java - Android,Volley Request,响应阻塞主线程

使用Volley处理大型响应时发生了一些不好的事情:Stringurl=AppHelper.DOMAIN+"/service/pages/profile_update.json";this.infoTextView.setText(getString(R.string.profile_info_updating));finalStringRequeststringRequest=newStringRequest(Request.Method.POST,url,newResponse.Listener(){@OverridepublicvoidonResponse(Stringrespo

android - 库 com.google.firebase :firebase-analytics is being requested by various other libraries

更新Firebase库时出现此错误:Thelibrarycom.google.firebase:firebase-analyticsisbeingrequestedbyvariousotherlibrariesat[[15.0.1,16.0.0),[16.0.1,16.0.1],[16.0.1,99999]],butresolvesto16.0.1.Disablethepluginandcheckyourdependenciestreeusing./gradlew:app:dependencies.依赖项是:implementation'com.google.firebase:fire

java - 如何解决 jsoup 错误 : unable to find valid certification path to requested target

我正在尝试解析以下URL的html:https://www.smuc.ac.kr/mbs/smuc/jsp/board/list.jsp?boardId=6993&id=smuc_040100000000我收到以下错误:sun.security.validator.ValidatorException:PKIXpathbuildingfailed:sun.security.provider.certpath.SunCertPathBuilderException:unabletofindvalidcertificationpathtorequestedtargetatsun.secur

android.database.CursorIndexOutOfBoundsException : Index -1 requested

我正在尝试使用RawContacts.entityIterator读取所有联系人,但我看到了这个错误:android.database.CursorIndexOutOfBoundsException:请求索引-1以下是我的代码:ContentResolvercr=getContentResolver();Cursorcur=cr.query(Contacts.CONTENT_URI,null,null,null,null);Stringid=cur.getString(cur.getColumnIndex(Contacts._ID));if(cur.getCount()>0){whil

Android Contacts._ID != Data.CONTACT_ID

我正在针对CommonDataKinds.Phone.CONTENT_URI运行查询,我得到的所有结果都具有NOTNULL电话ID。大致的代码是:String[]projection2=newString[]{ContactsContract.CommonDataKinds.Phone.NUMBER,ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,ContactsContract.CommonDataKinds.Phone.CONTACT_ID,ContactsContract.Contacts._ID,ContactsContr