Proxy can not be resolved - android

I used the same code with only little changes as follows from here :
Downloading File in Android
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(
"Myproxy", 8080));
URL url = new URL(sUrl[0]);
HttpURLConnection uc = (HttpURLConnection) url
.openConnection(proxy);
uc.connect();
int fileLength = uc.getContentLength();
I am getting following exception for this:
04-12 09:31:42.401: WARN/System.err(5181): java.net.UnknownHostException: Host is unresolved: Myproxy:8080
04-12 09:31:42.405: WARN/System.err(5181): at java.net.Socket.connect(Socket.java:1057)
04-12 09:31:42.405: WARN/System.err(5181): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:62)
04-12 09:31:42.405: WARN/System.err(5181): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:88)
04-12 09:31:42.405: WARN/System.err(5181): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:927)
04-12 09:31:42.409: WARN/System.err(5181): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:884)
04-12 09:31:42.409: WARN/System.err(5181): at com.test.filedownload.FileDownloadActivity$DownloadFile.doInBackground(FileDownloadActivity.java:99)
04-12 09:31:42.413: WARN/System.err(5181): at com.test.filedownload.FileDownloadActivity$DownloadFile.doInBackground(FileDownloadActivity.java:1)
04-12 09:31:42.416: WARN/System.err(5181): at android.os.AsyncTask$2.call(AsyncTask.java:185)
04-12 09:31:42.420: WARN/System.err(5181): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-12 09:31:42.420: WARN/System.err(5181): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-12 09:31:42.420: WARN/System.err(5181): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
04-12 09:31:42.424: WARN/System.err(5181): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
04-12 09:31:42.424: WARN/System.err(5181): at java.lang.Thread.run(Thread.java:1096)
Please help to resolve the same.
Thanks,
Sneha

This is an issue in Android versions 2.2 that they do not support Proxy
But some phones like LG P500 works with OPera as the brwoser.
There is a great detail about this on
http://android-proxy.blogspot.com/
But you can really achive this using proxoid, it is an HTTP proxy for Android.
code.google.com/p/proxoid/
More information can be had from this site.Hope this will help you.

java.net.UnknownHostException: Host is unresolved: Myproxy:8080
This says that there is no host named Myproxy in the network. Obtain the proxy name and port and use them in code.

Related

Android webview won't load my URL but will load others

I have a webiew app on android which loads some websites but not the one I need it to.
I have no idea if this is a problem with the website host or something I can do in my app. Basically I have an online portfolio I'm making for university and I want to make myself look better by building it into an app. The portfolio site includes a mobile version so it's already set up for that and works fine in the chrome browser on my phone.
It used to work with an old site and it loads google so I know I have the internet permission right. Not sure if it's something to do with my new site or I just need to change something to make it work.
In the chrome browser it looks as it should, which isn't good at the moment because I wanted to do this first before I added content to it. This is how it looks. (Can't post a screenshot directly as I don't have enough rep, sorry)
Here is my main app code:
package com.broadbentstudios;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.parse.ParseAnalytics;
#SuppressLint("SetJavaScriptEnabled")
public class ParseStarterProjectActivity extends Activity {
WebView webView;
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webView = (WebView) findViewById(R.id.mainWebView);
webView.setBackgroundColor(0x00000000);
webView.setHorizontalScrollBarEnabled(false);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setUseWideViewPort(true);
webView.loadUrl("http://www.broadbentstudios.com/");
webView.setWebViewClient(new WebViewClient() {
#Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
return true;
}
});
}
#Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && webView!=null && webView.canGoBack()) {
webView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
{
ParseAnalytics.trackAppOpenedInBackground(getIntent());
}
}
Screenshot of my site when using my app with the code above.
Here is the logcat.
04-12 18:51:45.686: D/PowerManagerService(1196): acquireWakeLockInternal: lock=903227323, flags=0x1, tag="LocationManagerService", ws=WorkSource{1000 com.qualcomm.location}, uid=1000, pid=1196
04-12 18:51:45.686: D/PowerManagerService(1196): acquireWakeLockInternal: lock=662236910, flags=0x1, tag="LocationManagerService", ws=WorkSource{10013 com.google.android.gms}, uid=1000, pid=1196
04-12 18:51:45.687: D/PowerManagerService(1196): acquireWakeLockInternal: lock=531027438, flags=0x1, tag="LocationManagerService", ws=WorkSource{10013 com.google.android.gms}, uid=1000, pid=1196
04-12 18:51:45.687: D/PowerManagerService(1196): releaseWakeLockInternal: lock=959227632 [LocationManagerService], flags=0x0
04-12 18:51:45.687: D/PowerManagerService(1196): releaseWakeLockInternal: lock=546372682 [LocationManagerService], flags=0x0
04-12 18:51:45.688: D/PowerManagerService(1196): releaseWakeLockInternal: lock=662236910 [LocationManagerService], flags=0x0
04-12 18:51:45.688: D/PowerManagerService(1196): releaseWakeLockInternal: lock=531027438 [LocationManagerService], flags=0x0
04-12 18:51:45.689: D/PowerManagerService(1196): releaseWakeLockInternal: lock=197382963 [LocationManagerService], flags=0x0
04-12 18:51:45.689: D/PowerManagerService(1196): releaseWakeLockInternal: lock=903227323 [LocationManagerService], flags=0x0
04-12 18:51:45.734: I/LibraryLoader(28664): Time to load native libraries: 34 ms (timestamps 2209-2243)
04-12 18:51:45.734: I/LibraryLoader(28664): Expected native library version number "",actual native library version number ""
04-12 18:51:45.747: V/WebViewChromiumFactoryProvider(28664): Binding Chromium to main looper Looper (main, tid 1) {24dd5d0b}
04-12 18:51:45.747: I/LibraryLoader(28664): Expected native library version number "",actual native library version number ""
04-12 18:51:45.747: I/chromium(28664): [INFO:library_loader_hooks.cc(108)] Chromium logging enabled: level = 0, default verbosity = 0
04-12 18:51:45.757: I/BrowserStartupController(28664): Initializing chromium process, singleProcess=true
04-12 18:51:45.758: W/art(28664): Attempt to remove local handle scope entry from IRT, ignoring
04-12 18:51:45.768: W/AudioManagerAndroid(28664): Requires BLUETOOTH permission
04-12 18:51:45.769: W/chromium(28664): [WARNING:resource_bundle.cc(304)] locale_file_path.empty()
04-12 18:51:45.770: I/chromium(28664): [INFO:aw_browser_main_parts.cc(63)] Load from apk succesful, fd=59 off=45928 len=3221
04-12 18:51:45.770: I/chromium(28664): [INFO:aw_browser_main_parts.cc(76)] Loading webviewchromium.pak from, fd:60 off:390788 len:1143511
04-12 18:51:45.775: D/libEGL(28664): loaded /vendor/lib/egl/libEGL_adreno.so
04-12 18:51:45.776: D/libEGL(28664): loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
04-12 18:51:45.788: D/libEGL(28664): loaded /vendor/lib/egl/libGLESv2_adreno.so
04-12 18:51:45.803: I/Adreno-EGL(28664): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.1.C2.05.00.00.046.002_msm8974_LA.BF.1.1.1.C2__release_AU ()
04-12 18:51:45.803: I/Adreno-EGL(28664): OpenGL ES Shader Compiler Version: E031.25.03.00
04-12 18:51:45.803: I/Adreno-EGL(28664): Build Date: 01/06/15 Tue
04-12 18:51:45.803: I/Adreno-EGL(28664): Local Branch: mybranch6793908
04-12 18:51:45.803: I/Adreno-EGL(28664): Remote Branch: quic/LA.BF.1.1.1.c2
04-12 18:51:45.803: I/Adreno-EGL(28664): Local Patches: NONE
04-12 18:51:45.803: I/Adreno-EGL(28664): Reconstruct Branch: AU_LINUX_ANDROID_LA.BF.1.1.1.C2.05.00.00.046.002 + NOTHING
04-12 18:51:45.868: W/chromium(28664): [WARNING:data_reduction_proxy_settings.cc(328)] SPDY proxy OFF at startup
04-12 18:51:45.890: W/art(28664): Attempt to remove local handle scope entry from IRT, ignoring
04-12 18:51:45.895: W/AwContents(28664): onDetachedFromWindow called when already detached. Ignoring
04-12 18:51:45.917: E/QCOMSysDaemon(28750): Can't open /dev/block/platform/msm_sdcc.1/by-name/bootselect: (No such file or directory)
04-12 18:51:45.917: I/QCOMSysDaemon(28750): Starting qcom system daemon
04-12 18:51:45.917: E/Diag_Lib(28750): Diag_LSM_Init: Failed to open handle to diag driver, error = 2
04-12 18:51:45.917: E/QCOMSysDaemon(28750): Diag_LSM_Init failed : 0
04-12 18:51:45.953: D/OpenGLRenderer(28664): Render dirty regions requested: true
04-12 18:51:45.956: D/Atlas(28664): Validating map...
04-12 18:51:45.962: E/com.parse.push(28664): successfully subscribed to the broadcast channel.
04-12 18:51:45.963: D/PowerManagerService(1196): acquireWakeLockInternal: lock=553909931, flags=0x1, tag="Intent { act=com.google.android.c2dm.intent.REGISTRATION flg=0x10 pkg=com.broadbentstudios cmp=com.broadbentstudios/com.parse.GcmBroadcastReceiver (has extras) }", ws=null, uid=10221, pid=28664
04-12 18:51:45.992: I/OpenGLRenderer(28664): Initialized EGL, version 1.4
04-12 18:51:45.997: D/OpenGLRenderer(28664): Enabling debug mode 0
04-12 18:51:46.009: D/PowerManagerService(1196): releaseWakeLockInternal: lock=553909931 [Intent { act=com.google.android.c2dm.intent.REGISTRATION flg=0x10 pkg=com.broadbentstudios cmp=com.broadbentstudios/com.parse.GcmBroadcastReceiver (has extras) }], flags=0x0
04-12 18:51:46.029: I/Timeline(28664): Timeline: Activity_idle id: android.os.BinderProxy#19326283 time:33412539
04-12 18:51:46.030: D/PowerManagerService(1196): releaseWakeLockInternal: lock=110279535 [ActivityManager-Launch], flags=0x0
04-12 18:51:46.038: I/ActivityManager(1196): Displayed com.broadbentstudios/.ParseStarterProjectActivity: +864ms
04-12 18:51:46.038: I/Timeline(1196): Timeline: Activity_windows_visible id: ActivityRecord{3eff1853 u0 com.broadbentstudios/.ParseStarterProjectActivity t1645} time:33412548
04-12 18:51:46.055: D/ForegroundUtils(4725): Foreground changed, PID: 4813 UID: 10182 foreground: false
04-12 18:51:46.055: D/ForegroundUtils(4725): Foreground UID/PID combinations:
04-12 18:51:46.055: D/ForegroundUtils(4725): UID: 10221 PID: 28664
04-12 18:51:46.386: D/AbstractMetricsFactoryImpl(28721): record : No data points in metrics event
04-12 18:51:46.637: W/BindingManager(28664): Cannot call determinedVisibility() - never saw a connection for the pid: 28664
04-12 18:51:47.134: I/chromium(28664): [INFO:CONSOLE(0)] "'webkitIDBRequest' is deprecated. Please use 'IDBRequest' instead.", source: (0)
04-12 18:51:47.422: I/chromium(28664): [INFO:CONSOLE(1)] "HARD RESET!!", source: http://www.broadbentstudios.com/application/_output/pb.out.front.js?v=7 (1)
04-12 18:51:47.440: I/chromium(28664): [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'clear' of null", source: http://www.broadbentstudios.com/application/_output/pb.out.front.js?v=7 (1)
04-12 18:51:48.338: D/audio_hw_primary(253): out_standby: enter: stream (0xb5801780) usecase(1: low-latency-playback)
Any help would be great, even if it's just so I know if it's my app or the site that is causing the problems.
Finally found the answer after a lot of searching. For anybody in a similar situation, as well as enabling javascript you also need to enable Dom storage by adding in;
webView.getSettings().setDomStorageEnabled(true);
Change webView to whatever yours is called and you should be good to go.
Hope this helps someone.
Your website has a JavaScript error. Did you try something about that error in the log you shared?
Uncaught TypeError: Cannot read property 'clear' of null", source:
http://www.broadbentstudios.com/application/_output/pb.out.front.js?v=7
(1)
I recently create one repository with a basic web view application for android with some error handling for no internet connection
https://github.com/jgarciabt/SmartWebView
You can clone it and start your application from it, maybe that is easier.

Android device cannot connect to localhost

I am developing an app for Android. I have been happily developing it for a while, connecting the phone to the PC using a USB, using 192.168.x.x as the address the code points to log in, etc.
I started my IDE a couple of hours before, and without changing a single comma anywhere, I receive an Exception:
10-21 17:15:04.177: W/System.err(24232): org.apache.http.conn.ConnectTimeoutException: Connect to /192.168.1.4:8080 timed out
10-21 17:15:04.177: W/System.err(24232): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
10-21 17:15:04.187: W/System.err(24232): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
10-21 17:15:04.187: W/System.err(24232): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
10-21 17:15:04.197: W/System.err(24232): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
10-21 17:15:04.197: W/System.err(24232): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
10-21 17:15:04.197: W/System.err(24232): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
10-21 17:15:04.197: W/System.err(24232): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
10-21 17:15:04.197: W/System.err(24232): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
10-21 17:15:04.197: W/System.err(24232): at myPackage.CustomHttpClient.executeHttpPost(CustomHttpClient.java:54)
10-21 17:15:04.197: W/System.err(24232): at myPackage.LoginActivity$3$1.run(LoginActivity.java:113)
I have checked the server is up
My phone is connected to the same wifi the PC with the server is
Internet permission is in my manifest
I do have Internet, since I am writing this here
My phone has Internet, since I have been accessing the internet with him, via the same WiFi
Did ipconfig to make sure the IP is correct
i am getting mad... any help? Thank you!
A very weird thing happened. When I did ipconfig I would swear over the most sacred thing on earth i saw 192.168.1.4. I did it more than one time, always saying 192.168.1.4. After posting this question I did it again...and it showed 192.168.1.3. i changed it in the Android app and now i am able to access server.
Is there some time between an IP has changed and the ipconfig shows it? Because im SURE it said 192.168.1.4 the first 3 times I did it...

check my application on tablet with server runs in the network

hi frnds i installed my application on my tablet. which use some web services of my server application. my tablet and PC is connected in same network.
my pc has ip address : 192.168.1.1
and my tablet has ip ; 192.168.1.6
my server application is running. but i cant connect with my server
and my server running in jBoss not in tomcat.
when i run localhost:8080.. in browser it open the jboss community page but when i give <1p address>:8080 it doesn't open the jboss community page
my Log cat :
05-29 09:38:08.045: W/System.err(334): org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.1.1:8080 refused
05-29 09:38:08.081: W/System.err(334): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:178)
05-29 09:38:08.081: W/System.err(334): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
05-29 09:38:08.081: W/System.err(334): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
05-29 09:38:08.081: W/System.err(334): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
05-29 09:38:08.081: W/System.err(334): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
05-29 09:38:08.081: W/System.err(334): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
05-29 09:38:08.081: W/System.err(334): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
You must be using this command to run your server
D:\jboss-5.0.0.CR2\bin>run.bat
But this will only run on localhost not on network.So try this code to run your server
D:\jboss-5.0.0.CR2\bin>run.bat -b 0.0.0.0
And then try using IP Address.I think this will solve your problem.

Android rest client with SSL to specific certificate

I'am trying to connect to SSL rest service from Android. The server uses a SSL cert that is not from a common CA (Thawte, Verisign...)
I'have used this example to proceed: http://blog.antoine.li/2010/10/22/android-trusting-ssl-certificates/
However, although I've done all the steps mentioned (create a BKS provider, create a a custom SchemeRegistry) I have still the error: "No peer certificate".
The code to call the service (from an AsyncTask):
DefaultHttpClient client = new MyHttpClient(mainActivity[0].getApplicationContext());
HttpGet get = new HttpGet("<url of the service>");
get.addHeader("Autorization","Basic YW5kcm9pZDo=");
// Execute the GET call and obtain the response
HttpResponse getResponse;
try {
getResponse = client.execute(get);
....
The code of the MyHttpClient is the same of the blog example. Doing the client.execute(get) crashes with the execption:
01-06 21:47:03.615: W/System.err(19289): javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
01-06 21:47:03.625: W/System.err(19289): at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:137)
01-06 21:47:03.630: W/System.err(19289): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
01-06 21:47:03.635: W/System.err(19289): at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
01-06 21:47:03.640: W/System.err(19289): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
01-06 21:47:03.645: W/System.err(19289): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
01-06 21:47:03.645: W/System.err(19289): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
01-06 21:47:03.645: W/System.err(19289): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
01-06 21:47:03.650: W/System.err(19289): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
01-06 21:47:03.650: W/System.err(19289): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
01-06 21:47:03.650: W/System.err(19289): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
01-06 21:47:03.650: W/System.err(19289): at validatedid.helloworldandroid.DownloadDevicePendingDocsTask.doInBackground(DownloadDevicePendingDocsTask.java:41)
01-06 21:47:03.650: W/System.err(19289): at validatedid.helloworldandroid.DownloadDevicePendingDocsTask.doInBackground(DownloadDevicePendingDocsTask.java:1)
01-06 21:47:03.655: W/System.err(19289): at android.os.AsyncTask$2.call(AsyncTask.java:264)
01-06 21:47:03.655: W/System.err(19289): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
01-06 21:47:03.655: W/System.err(19289): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
01-06 21:47:03.655: W/System.err(19289): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
01-06 21:47:03.660: W/System.err(19289): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
01-06 21:47:03.660: W/System.err(19289): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
01-06 21:47:03.660: W/System.err(19289): at java.lang.Thread.run(Thread.java:856)
In some places say it could be an error from the server but I don't know how to check that. Any help would be really apreciated.
Thanks in advance.
Looking more into stackoverflow I find the solution to the problem.
Looks like using the code from http://blog.antoine.li/2010/10/22/android-trusting-ssl-certificates/ is not enough (at least for me).
SSLSocketFactory needs to be subclassed. Full explanation in: Trusting all certificates using HttpClient over HTTPS
I leave here the answer in case anybody arrives here.
I hope in next versions of Android it will be a easier way to acces rest services with https because is a common task and currently is not very easy.
I used ->this<- to make my Https Self-Signed Certificate connections, without disabling certificate or host validation, so it's REALLY secure from SSL pov.
In resume, need to create a Custom Keystore on your app so you can validate your server HTTP against the app KeyStore.
It's dissapointing to see that too much people consider disabling SSL validations a correct answer to this type of questions, when in fact, the whole point of SSL is Security and Validations. If you intend to avoid any validation, just stick to plain HTTP
Please refer to this answer i've recently made on another question

Https returns 404 with DefaultHttpClient on Android?

I have an http request that worked as http://blah.com and now I have been asked to use https://blah.com
The former works and the later fails with a Network I/O error. Are there any missing parameter settings that I need for the client?
The URL request:
D/MyAppWebservice(23142): http-transform :) [https://cdp.mobibob.com:8151/DoTransaction]
Following is the log:
E/MyAppContentProvider(23142): com.mobibob.myapp.MyAppExceptions$ParseException: Network or I/O error calling web service.
W/System.err(23142): com.mobibob.myapp.MyAppExceptions$ParseException: Network or I/O error calling web service.
W/System.err(23142): at com.mobibob.myapp.MyAppWebservice.queryApi(MyAppWebservice.java:558)
W/System.err(23142): at com.mobibob.myapp.MyAppContentProvider.queryWebservice(MyAppContentProvider.java:751)
W/System.err(23142): at com.mobibob.myapp.MyAppContentProvider.query(MyAppContentProvider.java:440)
W/System.err(23142): at android.content.ContentProvider$Transport.query(ContentProvider.java:130)
W/System.err(23142): at android.content.ContentResolver.query(ContentResolver.java:202)
W/System.err(23142): at com.mobibob.myapp.ui.DownloadActivity.goGenDownloadTransaction(DownloadActivity.java:168)
W/System.err(23142): at com.mobibob.myapp.ui.DownloadActivity$DownloadTransaction.doInBackground(DownloadActivity.java:90)
W/System.err(23142): at com.mobibob.myapp.ui.DownloadActivity$DownloadTransaction.doInBackground(DownloadActivity.java:1)
W/System.err(23142): at android.os.AsyncTask$2.call(AsyncTask.java:185)
W/System.err(23142): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err(23142): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err(23142): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
W/System.err(23142): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
W/System.err(23142): at java.lang.Thread.run(Thread.java:1096)
W/System.err(23142): Caused by: java.io.IOException: SSL handshake failure: I/O error during system call, Unknown error: 0
W/System.err(23142): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconnect(Native Method)
W/System.err(23142): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:305)
W/System.err(23142): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)
W/System.err(23142): at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:321)
W/System.err(23142): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:129)
W/System.err(23142): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err(23142): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
W/System.err(23142): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
W/System.err(23142): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err(23142): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err(23142): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err(23142): at com.mobibob.myapp.MyAppWebservice.queryApi(MyAppWebservice.java:510)
W/System.err(23142): ... 13 more
Https almost always implies a different port being used (standard http=>80; standard https=>443). You have a hardcoded port (8151). I'm guessing the https servlet is listening on a different port.
Or you're trying to connect to a server that doesn't support https.

Categories

Resources