我正在使用此ReverseGeocodeRequest2来请求Geo坐标的信息。在提出请求之前,我在我的日志上得到了这个。
private ResultListener<List<com.here.android.mpa.search.Location>> mGeocodeResultListener =
new ResultListener<List<com.here.android.mpa.search.Location>>() {
@Override
public void onCompleted(List<com.here.android.mpa.search.Location> locations,
ErrorCode errorCode) {
Log.d(TAG, "geo code listener " + errorCode);
if(errorCode == ErrorCode.NONE && locations != null && locations.size() >=1) {
for (com.here.android.mpa.search.Location location :
locations) {
Log.d(TAG, "Geocode " + location.getAddress().toString());
}
Image marker = new Image();
marker.setBitmap(
BitmapFactory.decodeResource(mContext.getResources(),
mContext.getResources().getIdentifier(
"marker_car1_map_gps",
"drawable",
mContext.getPackageName()
)
));
mMap.addMapObject(new MapMarker(locations.get(0).getCoordinate(), marker));
mMap.setCenter(locations.get(0).getCoordinate(), Map.Animation.NONE);
} else {
//Toast.makeText(mContext, "Error " + errorCode, Toast.LENGTH_SHORT).show();
}
}
};
GeocodeRequest mGeocodeRequest = new GeocodeRequest(address).setSearchArea(this.mMap.getCenter(),50);
ErrorCode err_code = this.mGeocodeRequest.execute(mGeocodeResultListener);
if (err_code == ErrorCode.NONE) {
Log.d(TAG, "Rev Geo Request is completed " );
} else {
Log.d(TAG, "Rev Geo Request is completed " + err_code);
}
//error
03-07 10:31:10.453 27266-27266/? I/art: Late-enabling -Xcheck:jni
03-07 10:31:11.006 27266-27283/global.Here.Map.Service.v2 D/NetworkProtocol: NetworkProtocol::NetworkProtocol
03-07 10:31:11.008 27266-27283/global.Here.Map.Service.v2 D/NetworkProtocol: NetworkProtocol::NetworkProtocol
03-07 10:31:11.022 27266-27328/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: NetworkSSLContextFactory created successfully
03-07 10:31:11.022 27266-27328/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: generateSSlContext BEGIN
03-07 10:31:11.093 27266-27328/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: The number of files 164 found in /storage/emulated/0/.here-maps/certs/
03-07 10:31:11.382 27266-27328/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: The number of valid certificates 164
03-07 10:31:11.427 27266-27328/global.Here.Map.Service.v2 D/NetworkSSLContextFactory: generateSSlContext END javax.net.ssl.SSLContext@13d84ca1
03-07 10:31:11.428 27266-27328/global.Here.Map.Service.v2 D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0
03-07 10:31:11.428 27266-27328/global.Here.Map.Service.v2 D/libc: getaddrinfo called from pid =27266
03-07 10:31:11.428 27266-27328/global.Here.Map.Service.v2 D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=4; ai_family=0
03-07 10:31:11.429 27266-27328/global.Here.Map.Service.v2 D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0
03-07 10:31:11.429 27266-27328/global.Here.Map.Service.v2 D/libc: getaddrinfo called from pid =27266
03-07 10:31:11.429 27266-27328/global.Here.Map.Service.v2 D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=1024; ai_family=0
03-07 10:31:11.482 27266-27328/global.Here.Map.Service.v2 D/libc: dnsproxy getaddrinfo returns 0
03-07 10:31:11.482 27266-27328/global.Here.Map.Service.v2 I/System.out: propertyValue:false
03-07 10:31:12.369 27266-27328/global.Here.Map.Service.v2 E/NetworkProtocol: NetworkProtocol::GetTask::run exception: javax.net.ssl.SSLHandshakeException: Connection closed by peer
03-07 10:31:12.369 27266-27328/global.Here.Map.Service.v2 W/System.err: javax.net.ssl.SSLHandshakeException: Connection closed by peer
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:302)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.Connection.upgradeToTls(Connection.java:238)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.Connection.connect(Connection.java:158)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.Connection.connect(Connection.java:170)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:309)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:242)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:397)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:347)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:515)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
03-07 10:31:12.370 27266-27328/global.Here.Map.Service.v2 W/System.err: at com.here.hype.NetworkProtocol$GetTask.run(NetworkProtocol.java:221)
03-07 10:31:12.371 27266-27328/global.Here.Map.Service.v2 W/System.err: at java.lang.Thread.run(Thread.java:818)
03-07 10:31:12.592 27266-27283/global.Here.Map.Service.v2 D/NetworkProtocol: NetworkProtocol::NetworkProtocol
我可以在HERE SDK证书上添加我公司的代理证书吗? 有什么办法可以解决这个问题吗?谢谢!
答案 0 :(得分:0)
很抱歉不,出于安全考虑,这是不可能的。我们不允许覆盖用于身份验证的证书集。