I am facing an issue on opening apps when working from office network using android emulator. I am using Android 4.4.2 with API 19. I know there is a proxy defined to access the network & I have set the same at the below path:
Settings->Wireless&Networks->MobileNetworks->AccessPointNames->Edit-> Set the Proxy, Port, Username & Password
On applying the above settings, I am able to access internet on the emulator browser however still facing issues the issue on accessing apps.
Request you all to please provide any suggestion/advice to overcome from this issue. I know there are many threads asking about the same however I did not find any in which the issue while opening the apps got resolved.
Regards,
Anuj
There is a emulator-wide setting for using HTTP proxy:
http://developer.android.com/tools/devices/emulator.html#proxy as explained here https://stackoverflow.com/a/12940297/1356130
Related
I am having difficulty getting Cognito registration and login to work for my app in Android Studio using this sample. When I attempt to log in via the simulator, the app works for a few seconds, then displays an error message: "Unable to execute HTTP request: Unable to resolve host 'cognito-idp.us-east-1.amazonaws.com': No address associated with hostname". This same error is the only error that appears in the console. I have seen similar questions and tried solutions such as checking to ensure my app has the permissions android.permission.INTERNET and android.permission.ACCESS_NETWORK_STATE, but the error persists. It also doesn't seem to be a network issue. I have updated to the latest version of the Android SDK as well as the AWS SDK, and the problem persists.
I currently I have a Cognito user pool set up which works properly for login on the iOS version of my app. Following the instructions in the readme for the sample code, I added an app to my existing user pool, and then copied and pasted the newly generated app client ID and app client secret into AppHelper.java for clientId and clientSecret respectively. I also set userPoolId to the ID listed for my user pool under "pool details" in the Cognito conosle, and cognitoRegion to US East, since this is the region of my user pool. I noticed that there was no need for me to set the pool name, as there was in the iOS version, so I'm wondering if that's something I need to do.
Sorry if this counts as a duplicate, but I wanted to post a question with the exact error message I encountered and the steps I took, and I'm wondering if someone has managed to get this specific sample working and what I should do.
The problem has been resolved, but unfortunately I'm not quite sure what fixed it since I didn't change anything in the code. All I did was install an update, so anyone with a similar problem should probably ensure that all SDKs used in the sample are properly updated, along with the simulator. It's also worth noting that I was using a different network than in my previous tests, so it's possible that it was a network issue after all.
I had the same issue.
The issue occurred when I used a VPN with emulator to test my program. The reason was that the internet connection in the emulator was too slow when connecting through a VPN.
This could also happen if your internet connection is not strong enough.
The solution is, use a real android device to test your code, if your internet connection is not good enough.
More info: https://github.com/aws-amplify/aws-sdk-android/issues/567
So far I managed to capture the traffic of local Java programs & Android browser successfully. However, I failed to capture traffic of my Android application (using HttpsUrlConnection).
While following the steps in this guide to configure the WiFi network on the device, in the step of downloading the certificate I faced an odd behavior as Chrome raised an error and Firefox installed it without opening the expected dialog:
But when I try to download it again, it says that the certificate is already installed.
Anyway, when running my app (on a real device, Karbonn S203 API 19), there are no requests nor tunnels logged in Fiddler. I tried a lot including inspecting this thread to no avail. In other articles I read about showing tunnels only but I don't have them either. Am I missing anything?
Thanks.
EDIT: I managed to install is "correctly" (with the above screen) from Settings -> Security -> Install Certificate after copying if from PC. Still I cannot see the requests in Fiddler.
Apparently the problem occurred due to using some uncommon devices (well, at least uncommon in Europe/North America). They've probably made some configuration changes in their AOSP version. When working the same way with Nexus 5 I managed to add the ceritifcate under 'WiFi' and then captured requests successfully.
Looks like your app does not use Fiddler as a proxy. When you call openConnection do you pass a Proxy object to it? If so, how do you initialize this proxy object?
You might want to try sending some HTTP traffic through first to make sure you are using the correct proxy settings and then try with HTTPS.
I'm trying to instantiate an URL object (in Java) with the address: http://www.cornellrams.com/rss.php. It gives me an UnknownHostException. The site is live and well, but I can't access the feed. Any ideas why it doesn't like me? This is on Android. I do have the internet permission in the manifest.
May be firewall is blocking network connection for the emulator. You need to set /allow emulator to use network connection and also set network connection sharing.
Double check the url ... chances are there's a typo in it somewhere. If not then DNS issue, but you can access the web browser ... so unlikely if you can browse.
Ensure you are using the correct protocol i.e http/https depending on whether you are using ssl
I often get issues with the wifi on my samsung gadgets. not sure what it is perhaps a request gets stuck so I'm forced to turn wifi off then back on again ... it happens a lot (especially with twitter app).
Also make sure that your timeout's are generous especially if using 3g rather than wifi.
I faced same problem once with my emulator. Restarting the emulator helped (maybe also with cleaning build).
I am trying to implement my first Android C2DM aplication. I have difficulty in adding a google account. My machine is behind a proxy, but I have added an APN with the proxy,port,username,password details. I can go to the google account page using a browser, I have tried the http and https sites and I am able to access. But when I try to add a google account by going to settings-> Accounts and Sync-> Add Account->google->Already have a google account->signin->give details...It gives me this message..
Error message is "Cant establish a reliable data connection to the server"
When i used wire shark and checked the proxy it connecting to, It is not using the proxy I have given in the APN section. Anybody knows how do I solve this problem? I am using GoogleApp API Level 9 Platform 2.3.1.
I have managed to solve this issue, The emulator was somehow not detecting the proxy settings. Then I fired the emulator from command prompt using the below command and it all worked fine and I have managed to add the google account.
emulator.exe -avd GoogleDevice -http-proxy ###.##.###.##:$$$$ -debug-proxy
Note: # is my proxy and $ is my port, GoogleDevice is the name of the device you would like to run.
the solution I found here! :
http://www.grokkingandroid.com/using-a-google-account-in-the-emulator/
I am trying to build a google app engine app in Java. The app is trying to get information from another site. On my computer I am behind a firewall and need to connect to the site through a proxy. Google app engine does not allow the use of java.net.proxy. Is there a way to configure eclipse so it knows that when I use URL.getContent() my local host will connect to that url through a proxy??
Look at this thread issue, there's a patched jar that allows you to connect through a Proxy.
It seems there's no way to do this, at least with current release of the SDK. I've gone through suffering from this problem.
The workaround is to make your system inherently aware of proxy. For example, use VPN, or use iptables to configure your proxy on Linux system.
It seems when your use normal way to specify a proxy as with other Java application it will invoke a class not in the JRE white list of GAE/J.