Set httpRequest proxy in android - android

I want my android application (not my device) use a special proxy setting for all requests
Is there any way to set that?
Thanks

if you are using URLConnection you can create the connexion with this :URL.openConnection(Proxy)

Related

Android show error when server shifted from http to https

My live android app stop working when server shifted from http to https.
Tried adding .htaccess for redirecting but still same problem.
i can't change my baseurl at android, but need help to modify at php code.
because android does not understand your serverside configuration so you have to put it manually in an android constant file make for the store base URL and all basic string data so you have not to change everywhere....and save lots of time...also please show your android code ...so anyone can understand where you want to change
Yes... i got the solutions..
you can change http to https without changed android code base url ( which was live with http ) by not forcing to https at cpanel > domains > Force HTTPS Redirect > off
thanks

android - how to hide url request

recently some one told me that he retrieves all the url requests from my android application and he sent them to me .
I'm using proguard in my application but he told me there are some ways that he can monitor the url requests .
I'm using URLConnection in my application .
how can I hide the url requests and somehow encrypt the urls so no one can read and access my url requestes ?
You can't. It's quite easy to use a proxy to catch all network traffic and check what you are using. If the problem is related with the content, then you can switch from http to https, but the host will be always visible. Actually as user I would be really scared about an app that want to hide such information however.
USE https instead of http, it is secured.
Try with HTTPS and add SSL(TSL) pinning to the network call.

How can we use HTTP Proxy Server in Android through Android Application?

I Want to set up HTTP Proxy Server through My Application.
How Can I set up Proxy Server from my application ?
you can use ProxySelector api help at http://developer.android.com/reference/java/net/ProxySelector.html
and proxy API help at http://developer.android.com/reference/java/net/Proxy.html also check this out i think first answer is useful for you How can you set the http proxy programatically?

Android emulator cannot connect with local tomcat server with HttpURLConeectioin

I'm doing a project to connect Android with local Tomcat server. But now I'm facing a problem for about 1 week. Who can help me..Thanks very much!
I use the newest android API and Tomcat 7.0. When I start Tomcat server. I can access the Tomcat homepage through emulator browser with url:(http://10.0.2.2:8080). But when I use HttpUrlConnection in the code. I cannot get the successful connection. I also use httpurlconnection to access www.google.com and www.android.com. I cannot connect them either.I use HttpURLConnection.HTTP_OK to see whether it make a successful connection. I also see the Connected is false for HttpURLConnection instance I make.
By the way I also add the internet access permission for it in AndroidManifest.xml before tag.
Thank you very much! Help me. It's emergency.
I recently had this problem. As mentioned above, (on Windows) start cmd, and use ipconfig to find the PC's IP address. Also, due to my Eclipse/Tomcat configuration I needed to have my Eclipse project name in the URL. The URL I used was like this: http://192.168.1.2/myEclipseProject/ServletName
Also, you may need to add the port to the ip address, if your Tomcat still has the default configuration: 192.168.1.2:8080

Get android proxy crendetials

I have configured a proxy on my Android device. I'm developing an aplication in which I need to make a HTTP get throught the proxy. I can make the HTTP get but I MUST set again the user and password into the httpclient, so, how I can get the proxy credentials stored in the android device?
thanks.
I think that this could help you: https://stackoverflow.com/a/1626616/355465
cntlm is free local proxy (http://cntlm.sourceforge.net/) and can be used as a middle-ware between your device and the proxy with user name , it has option with cntlm -H to store your password , so you do not need to change your code, just configure the device to use cntlm proxy

Categories

Resources