草庐IT

Trusted_Connection

全部标签

Android : Getting a Bitmap from a url connection (graph. facebook.com)重定向到另一个网址

我已尽一切努力获得一个url,我可以在其中获取facebook用户的个人资料照片。现在剩下的唯一问题是将该图像放入位图对象中。因为,http://graph.facebook.com现在首先将连接重定向(正如我们在url中看到的那样)到https://fbcdn-profile-a.akamaihd.net/...(类似这样的事情)。所以,我想问一下如何从url获取位图:http://graph.facebook.com/...重定向到https://fbcdn-profile-a.akamaihd.net/... 最佳答案 你说得

android - 获取连接失败 : ETIMEDOUT (Connection timed out) in ftp connect

我一直在使用ftp在android应用程序的服务器上上传图像,我正在使用以下代码与ftp连接。它在Wi-fi中工作正常,但如果我切换到3G或2G连接,我会收到连接超时错误。那么请让我知道如何处理这种情况。我的客户在Veriozon、Sprint、ATT网络提供商中也面临这个问题。它的iPhone版本在所有网络中都运行良好。代码:try{ftpClient=newFTPClient();ftpClient.setConnectTimeout(30);ftpClient.connect(InetAddress.getByName(server));booleanisLogin=ftpCli

java - setRequestProperty 方法给出 java.lang.IllegalStateException : Cannot set method after connection is made

HttpURLConnectioncon=null;Responseresponse=newResponse();StringTAG="HttpConHandler";try{/**IMPORTANT:*UserSHOULDprovideURLEncodedParms*/Log.p(TAG,"URL="+urlStr);Stringq=httpHeaders.get("Authorization");URLurl=newURL(urlStr);con=(HttpURLConnection)url.openConnection();con.setRequestProperty("Auth

android - LiveReload ionic : ​The connection to the server was unsuccessful (http://192. 168.56.1:8100/)

我正在尝试使用LiveReload在Android设备上运行我的应用程序。使用“ionicrunandroid”命令,一切正常,但是当我尝试执行“ionicrunandroid-l”以使用livereload时,我在SplashScreen后收到此错误:连接服务器失败(http://192.168.56.1:8100/)我使用的是Windows,我已经创建了一个入站规则以允许Windows防火墙的8100和35729端口,但仍然无法正常工作。Cordova白名单插件也在config.xml中安装和配置:我正在使用USB数据线连接到设备。版本:nodev6.9.5npmv4.3.0ion

android - java.net.SocketException : recvfrom failed: ECONNRESET (Connection reset by peer) 异常

我在Android中有一个HTTP服务器。我为提到的链接中的每个HTTP请求创建了一个新线程:http://hc.apache.org/httpcomponents-core-ga/httpcore/examples/org/apache/http/examples/ElementalHttpServer.java.当我发出多个GET请求时,有时会出现如下异常:01-2210:28:22.779:W/System.err(2019):java.net.SocketException:recvfromfailed:ECONNRESET(Connectionresetbypeer)01-2

安卓 : what are the causes for java.net.SocketException : Connection timed out?

在我的应用程序中正在下载加载数据。一切都很好,但有些却给出了奇怪的响应并抛出socketException:connectiontimout?谁能告诉我这些异常的原因是什么?以便我找出问题?给我一​​些解决方案来避免这些异常这里的日志......................**04-1915:44:52.591:WARN/System.err(18199):java.net.SocketException:Connectiontimedout04-1915:44:52.591:WARN/Smack/Packet(209):notifyconnbreak(IOEx),closecon

android - ionic 模拟 android ERR_CONNECTION_REFUSED localhost :8100

我尝试在Android上模拟我的Ionic应用程序。一旦我的应用程序在模拟设备中启动,它就会中断并出现以下错误:ApplicationErrornet::ERR_CONNECTION_REFUSED(http://localhost:8100)还有WebpagenotavailableThewebpageathttp://localhost:8100couldnotbeloadedbecause:net::ERR_CONNECTION_REFUSED在浏览器和iOS调试器中调试同一个项目就像一个魅力。cordova-plugin-whitelist已经安装,我的config.xml中有

android - CONNECTION_STATE_CHANGED 和 STATE_CHANGED 之间的区别

Android蓝牙接收器中的ActionCONNECTION_STATE_CHANGED和STATE_CHANGED有什么区别?elseif(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED.equals(action)){intstate=intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE,BluetoothAdapter.STATE_DISCONNECTED);if(state==BluetoothAdapter.STATE_CONNECTED){//nothing}e

android - android kitkat 版本中的 javax.net.ssl.SSLException : Connection closed by peer.

我正在使用RESTapi连接到sslhttps上的服务器问题出在安卓kitkat设备上。所有kitkat版本或4.x.x的设备都没有与服务器建立连接javax.net.ssl.SSLException:Connectionclosedbypeeratcom.android.org.conscrypt.NativeCrypto.SSL_do_handshake(NativeMethod)在所有上述设备上,4.x.x工作正常并建立连接有什么解决办法吗?我也尝试过OkHttp,但它在我的事业中也不起作用。 最佳答案 我之前遇到过类似的问题

java.io.IOException : Connection reset by peer 异常

我正在尝试管理我的手机和另一台蓝牙设备之间的连接。我正在使用javaAndroid完成所有这些工作。这是我使用我的设备连接套接字时使用的代码:首先我找到蓝牙设备并创建套接字:BluetoothDevicebtNonin=null;for(BluetoothDevicedevice:pairedDevices){if(device.getName().contains("Nonin")){//Wefoundthedeviceexito=true;try{//WecreatethesocketMethodm=device.getClass().getMethod("createRfcomm