Android :: Https Connection

Jun 15, 2009

I am doing a https post and I'm getting an exception of ssl exception Not trusted server certificate. If i do normal http it is working perfectly fine. Do I have to accept the server certificate somehow?

Android :: Https Connection


Android :: HTTPS Connection To Exactly One Site

Jan 18, 2010

I'm creating an app for the Android platform which will connect with just one site using HTTPS. It is essential that it won't be able to connect to any other sites, even with valid SSL certificates. I want it to be resistant to every form redirection (for example to site pretending to be the one I need to connect with) or other "attacks". Unfortunately I cannot find any good tutorial about SSL in Android.Do you know any? I'd be grateful for some links or advices. Or maybe could you give me some code snippets? My app is prepared to use HttpURLConnection or HttpClient - it makes no difference which path will I choose.

View 2 Replies View Related

Android :: Slow Reading From HTTPs URL Connection

Mar 28, 2009

So I have the following code.
StringBuilder sb = new StringBuilder(4096);
while (true) { int i = in.read(); if (i == 0) break;
else if (i == -1) throw new EOFException();
sb.append((char)i); }
What I see (with thousands of times run) is that this code takes about 1ms for every 7-10 bytes read. So reading just 10k takes almost a second!

View 4 Replies View Related

Android :: Client Certificate Authentication For Ssl / Https Connection

Feb 23, 2010

I want to connect to a server using ssl/https connection. During handshake between client and the server, I want to have server certificate authentication as well as client certificate authentication. The server certificate authentication is successful. But I don't know how to send client certificate to server for authentication, during the handshake.

View 4 Replies View Related

Android : Trouble Making Https Connection To Server - With Password Authentication

Oct 11, 2009

I'm having trouble making https connection to the server , with password authentication. What is the simplest & recommended way to do it ?

View 4 Replies View Related

Android :: HttpClient And HTTPS?

Apr 8, 2010

I'm new to implementing HTTPS connections in Android. Essentially, I'm trying to connect to a server using the org.apache.http.client.HttpClient. I believe, at some point, I'll need to access the application's keystore in order to authorize my client with a private key. But, for the moment, I'm just trying to connect and see what happens; I keep getting an HTTP/1.1 400 Bad Request error.

I can't seem to make heads or tails of this despite many examples (none of them seem to work for me). My code looks like this (the BODY constant is XmlRPC):

CODE:.......................

View 1 Replies View Related

Android :: Using Ksoap2 Via Https?

Feb 11, 2010

Has any one been able to connect to a soap server using ksoap2 android via https?

I keep getting the error that "Hostname <###>was not verified"

CODE:..........

Apparently looking back at other ksoap which isn't for android your ment to us a different call to connect via https, but i can't find a way to do it in the android version.

View 1 Replies View Related

Android :: Get Image Source From HTTPs URL?

Nov 11, 2010

I am trying to get an image from a https url but it doesn't seem to display and get the image correctly but works fine on my computer browser. I have tested out a http url pointing to a different image and it works fine. My code is below:

public Bitmap getContactPhoto(String url) {
Bitmap pic = null; try { pic = BitmapFactory
.decodeStream((InputStream) new URL(
"https://mail.google.com/mail/photos/static/AD34hIjbK2m-Lj333E4nBcCkBC3MYl2tTs0xizuSqUOP3-Jd6DOrpFg1M5HG8jXh0MuPbeFepInZZDu92Dx8ST4b59EbOKmfYTortuuO3P1_Ohyu7b7a3gc")
.getContent()); } catch (MalformedURLException e) {
// TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) {
// TODO Auto-generated catch block e.printStackTrace(); } return pic; }

Here is the code from the activity class that calls the method above:
private ImageView mContactPhoto; private ContactDetailsViewHelper mViewHelper;
mContactPhoto = (ImageView) findViewById(R.id.contact_photo);
mViewHelper = new ContactDetailsViewHelper(mContext);
mContactPhoto.setImageBitmap(mViewHelper.getContactPhoto(mDetail.getImageRef()));
ignore the mDetail.getImageRef, that passes the real url value but for this case I tried hard coding the url as you can see from the getContactPhoto method.

View 1 Replies View Related

Android :: How To Track All Https Requests?

Apr 12, 2010

How to collect URLs of all http/https requests made by the phone as well as well as the return status code and user agent from the headers. This information should be coming for all browser requests and other applications too.Please let me know this information can be retrieved on App level or we have to go to system level for this.

View 5 Replies View Related

Android :: Java URL Class Can't Use HTTPS In App / Way To Do

Jan 11, 2010

I want to use HTTPS in my application. The Java URL class does not seem to do the job.

Does anyone have any pointers?

View 3 Replies View Related

Android :: HTTPS SSL Error While Installing?

Sep 7, 2010

I downloaded Android SDK when I run setup, it displays the following error message.

Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.

View 1 Replies View Related

Android :: HTTPS With Self Signed SSL Certificate - Solution Or Better?

Apr 29, 2010

I need to do is download some basic text-based and image files from a web server that has a self-signed SSL certificate. I have been trying to figure out how to use HttpClient to do this, but getting the SSL to work is a nightmare that seems to be way too much trouble for such a simple task. Is there a better way to perform these file downloads? Perhaps through a WebView or Browser feature? Reinventing the wheel of making a simple HTTPS GET request is a major pain, and is significantly holding up my development schedule.

View 3 Replies View Related

Android :: Load Https Requests With Webview

Jun 2, 2010

I'm trying to load https requests with a Webkit object but It shows only a blank page, with http requests I don't have problems, It shows the page correctly. I have look the source code of the browser, in http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a... but I don't understand how the browser process the https requests. I think that the class BrowserActivity process the http and https requests but I don't see how to do it. Somebody could explain how the browser process the https request? It uses a Webview object to show the response of the https requests?

View 5 Replies View Related

Android :: Progressive Video Play Over HTTPs

Jul 13, 2010

I am trying to stream video over https from Android browser. If the video URL is http, everything works fine. But when I switch the url to https, no video can be played. I tried 2 methods to stream over http/ https through Android browser.

1. Use html5 Video tag on browser (Android 2.0+ device) and call video.play( ) from javascript. - With Https url. Browser launches media player and the player displays alert dialog saying "Can't play video". I captured the client TCP traffic and found no SSL handshake between client and server. It looks like the player pops up the alert on any https link. - With Http url. Browser launches media player and the player can stream the video successfully.

2. Use direct link of html <a> tag on browser and click the link - With Https url. Browser downloads the video file without launching the player. The browser seems not try to load any https link in media player. - With Http url. Browser launches media player and the player can stream the video successfully.

So the above tests make me think Android media player cannot play media from any https url.

View 4 Replies View Related

Android :: HTTPS Authentication Over WiFi Using HttpClient 4

Jul 9, 2009

I have Android pet-project DroidIn which utilizes HttpClient 4 (built into Android) to do some form based authentication. I started noticing that people who are using WiFi are reporting connection problems. It also doesn't help that site I'm accessing has self-assigned certificate. Well - the question is (I'm quite vague on WiFi details) If WiFi at the hotspot doesn't support HTTPS would that be a good enough reason for connection to fail and is there anything that I can do beside proxying into another appserver using HTTP which then would call HTTPS site?

View 2 Replies View Related

Android :: Using Ksoap Over HTTPs To Request Data From Server?

Feb 11, 2010

I'm using ksoap over https to request data from a server. It works fine, but only every other time! Looking at the traffic with wire shark it seems that on every other request something goes wrong with the ssl traffic/handshake (data doesn't even get sent except for an fc-fault coming back). Doing the same requests using curl the server always responds fine and afaik the iPhone version of the program also doesn't seem to have any problems with the server.

View 13 Replies View Related

Android :: How To Design REST Writing PHP To Handle HTTPs?

Mar 2, 2010

In short, I am writing an Android application that I want to have pull data from a remote database. I was looking into .NET web services, but this http://stackoverflow.com/questions/297586/how-to-call-web-service-with-android question pointed me away from that direction.

Is REST as simple as writing some short PHP to handle something like https://www.example.com/data.php?employee=michael and have it return relevant XML or JSON data? That to me seems like what has been described to me by various sites and videos. Also, is this the best way to do this kind of operation over the internet for mobile devices, desktop applications, etc?

View 2 Replies View Related

Android :: Break Export Laws When Access Web Site Using Https From App

Dec 11, 2009

If I access my web site using https from my app will it break any export laws?

View 2 Replies View Related

Android :: WebView With Https LoadUrl Shows Blank Page

Sep 13, 2010

I used webview to visit https link. the page always show blank. i found the way to dill with it

CODE:................

That's work fine.

But i used API Android 2.1, the above method is belongs to Android 2.2.

View 1 Replies View Related

Android :: Droid Supports Https Client / Sample Code For It?

Nov 29, 2009

Is android supports https ?

Objective: Sending a xml file over https to a web server. The GET and POST is working fine with HTTP, but i don't have any idea regarding https.

It will be great if some sample code can provide me...

View 5 Replies View Related

Android :: DefaultHttpClient To Access Https Server Via Proxy - IllegalArgumentException Thrown?

Apr 19, 2009

Detail Descriptioin: 1. When I use the same code to access "http://www.google.com", it works. 2. When I use the same code to access "https://www.google.com", it doesn't work and will throw IllegalArgumentException..............

View 2 Replies View Related

Android :: Media Player Not Working On HTTPS As Data Source / Resolve It

Feb 15, 2010

I am able to play mp3 files from a HTTP server.I have given the link as Datasource and it is working fine.When I

replaced the link with HTTPS then media player is not working.Please help to resolve this issue.

View 2 Replies View Related

HTC EVO 4G :: PAW Server + Https - Restarted Application

Oct 12, 2010

I just ran across the 'PAW Server' app and it's pretty neat so far. I don't want to use it with http though, so I enabled https and restarted the app. It doesn't work at all now. I enabled bluetooth so I could manually update the config file on the sdcard and restart the server in http mode. It instantly started working again. I've tried a couple of different ports but can't get the https mode to work at all. The docs say that it will be slower which is understandable, but since it's not working at all I have to assume that I'm doing something wrong and missing something obvious. Anyone else using the PAW Server app with https enabled?

View 3 Replies View Related

HTC Desire :: Unable To Load HTTPS Sites

Sep 27, 2010

I've had my desire a few weeks now and have played with all the settings to try and get this to work, however I cannot get HTTPS sites to load, they just constantly time out. I've tried several different browsers however they don't load in any of them...xscope, dolphin, opera or standard.

View 1 Replies View Related

General :: HTTPS Doesn't Work On WiFi?

Aug 5, 2012

I'm having issues with Internet. Google sign-in, Facebook sign-in, Twitter etc I can't go to Google Play for the first time i.e. Accept screen then I can use WiFi to work. nothing works with WiFi if I connect the Data it works. But in browser http sites works fine.

I'm using a Belkin router. I tried 3 different Android's same problem. I tried using Google DNS address still no go. I updated the Routers firmware as well.

View 4 Replies View Related

Android :: Cancel/abort Connection From ThreadSafeClientConnManager Connection Pool

Oct 14, 2009

I'm using ThreadSafeClientConnManager to manage a pool of client connections, because my application has several threads, which are simultaneously connecting to a webserver.

Abstract sample code:

CODE:..............

Now lets say on of this threads is downloading a large file, but then the user of my application is switching to another activity/screen. Therefor the file is needless and I'd like to abort this download connection.

In ThreadSafeClientConnManager I found this method: public ClientConnectionRequest requestConnection (HttpRoute route, Object state) Returns a new ClientConnectionRequest, from which a ManagedClientConnection can be obtained or the request can be aborted.

So far I've been using:

CODE:.........

Now from what I understand, I've to use:

httpclient.getConnectionManager().requestConnection(HttpRoute route, Object state);

And that's the point where I'm stuck. I assume that for the route I can just use new HttpRoute(new HttpHost("10.0.0.1")) or whatever my server is, but what to put in for Object state?

And second, as soon as I've the ClientConnectionManager I can call getConnection(long timeout, TimeUnit tunit). But then from there, how I do I execute my HttpGet httpRequest = new HttpGet(URL_TO_FILE); as I did before with HttpResponse response = (HttpResponse) httpclient.execute(httpRequest);?

I've been gone through the documentation and tried out quite a few different things, but I wasn't able to obtain a working solution. Therefor any suggestions and/or code examples are more than welcome.

View 1 Replies View Related

Android :: Popup When No Connection Default Connection Failed Dialog

May 12, 2010

Whenever a application needs internet and connection fails, I get a message dialog

Connection failed
This application requires network access. Enable mobile network or Wi-Fi to download data.

and two buttons, Settings, Cancel.

How do I detect there is no internet connection?

How do I popup a same dialog in my application?

View 3 Replies View Related

Android :: Keep FTP Connection - Or Any Connection Object - Alive Between Activities

Oct 27, 2010

I'm coding a very basic FTP client on top of my application and I have 2 activities. The first one is the file explorer and the second one is the image viewer. Once I click on the image filename on the explorer, I want to pass the connection to the other activity to handle extra stuff. Basically, I want to keep the same org.apache.commons.net.ftp.FTPClient object (which handles the connection) alive in-between the 2 activities. I know I can't pass an object inside an intent so I don't know what my best bets are.

View 1 Replies View Related

Android :: Able To Have Voice Connection And Data Connection Simultaneously

Jul 23, 2010

What's the technical term for being able to have voice connection and data connection simultaneously? Like AT&T was promoting heavily for a while.Apparently, the new T-Mobile Vibrant has this capability. A friend got one and was accessing the web while talking to me, double jealous now.I have benn lusting after the Verizon version, Fascinate, and wondering if there is any chance it will as well.

View 2 Replies View Related

Android :: HTTPS GET (SSL) With Android And Self Signed Server Certificate

Sep 21, 2010

I have looked into various posts about how to retrieve something via HTTPS on Android, from a server that uses a self-signed certificate. However, none of them seem to work - they all fail to remove the "javax.net.ssl.SSLException: Not trusted server certificate" message. It is not an option to modify the server to have a trusted certificate, and it is also not an option to make the server certificate match the server's IP address. Note, that the server will not have a DNS name, it will only have an IP-address. The GET request looks something like this:

I am fully aware that this solution is prone to man-in-the-middle attacks etc. So, the solution must ignore the lack of trust in the certificate, and ignore the hostname mismatch. Does anybody know the code, that does this, using Java for Android? There are plenty of attempts to explain this on stackoverflow.com, and plenty of code snippets, but they don't seem to work, and nobody has provided one block of code that solves this, as far as I can see. It would be interesting to know if somebody really solved this, or if Android simply blocks certificates that are not trusted.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved