Can not add google account in Google App Emulator - java

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/

Related

This app isn't verified This app hasn't been verified by Google yet. Only proceed if you know and trust the developer

Hi I have developed an web application using google app engine, for google shared domain contact, Its working fine when I am running it in the localhost but when I deploy that application into google app engine it showing warning screen before user conforming for consent(as shown in the image).
I am using 2 scope http://www.google.com/m8/feeds/contacts/ and https://www.googleapis.com/auth/userinfo.email. when I try to add a user information in the google shared contact I am getting a exception message as www.google.com. How can I resolve the problem? am i need to verify my application in the oauth_app_verification. Can any one solve this?
Thank you.,
You need to go through the verification process before you launch your app. This new process came recently to protect user's data. You can start the verification by submitting this form but before it is recommended to follow steps here

Android AWS Cognito: unable to resolve host

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

Capturing Android applicataion traffic using FIddler

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.

With Android KitKat chrome://inspect/devices network monitoring, how to view all request data

I am using the "chrome://inspect/devices" and monitoring the http traffic for an Android application. This only works with the Android 4.4/KitKat. Within this tool, the set-cookie and cookie data does not show. Is there another tool or how can I configure this tool to show the cookie data for each request. The "cookie" store set of cookies do appear but not for each individual request between the server and client/Android device.
I believe this hybrid Cordova based web view is masking the cookies. I don't know how.
More information:
http://code.google.com/p/chromium/issues/detail?id=403490
Note: this is monitoring traffic between the Android device and a host PC, monitoring the traffic on the host PC.
Note: It looks like it is a "webview" or application/api/library issue. We are using Cordova to build this application. It is a hybrid/web-view application, I don't know why or how it could explicitly hide the cookie information? I was curious if anyone has any more detail on how a webview could hide cookies.
Since you mention
Is there another tool
I am going to jump at this part and offer you a different tool, i.e. Fiddler.
You can set up Fiddler with proxy
Change the Android device network settings to go through the proxy.
Now, you can capture complete network requests inclusive of any request made from the device.
So perfect for development, if I may say so.
Source - http://www.cantoni.org/2013/11/06/capture-android-web-traffic-fiddler
Helps to ease a painful debugging experience, to a pleasant one.
Some freebies
Fiddler also allows to break on http requests, modify the content, reissue requests without having to write any piece of code.
And another factor, it works for any Android release, iOS or Windows Phone or any device that supports proxy.
No SDKs required to do this!
If you are using a mac, you can checkout Charles network inspector.
Hope this helps!
Note - This answer is purely to help in inspecting the network traffic.
Update - HTTPS traffic
Install Fiddler Certificate to Android
As a final step to improve the debugging of secure HTTPS connections,
we can install a Fiddler “root” certificate on the Android device.
(Note: If your device does not already have a PIN or password, you
will need to set one up before installing the certificate.)
Steps:
On Android start the Chrome browser
Navigate to
http://ipv4.fiddler:8888/
Tap on the link for the “Fiddler Root
Certificate”
Name the certificate “Fiddler” and install it (entering
your PIN or password if prompted)
With this test certificate
installed, you should now be able to visit SSL sites from the Android
Chrome browser and not receive any certificate warnings. The network
traffic should also be viewable in Fiddler. Good test sites are those
which always force secure HTTPS connections, like the Wells Fargo
mobile site at https://wellsfargo.com/.
Exercpt from the posted link.
Have a look at the WebViews CookieManager. Specifically look at the 'allowFileSchemeCookies' and 'setAcceptFileSchemeCookies' methods. If they are false by default that may be the culprit.

Unable to access apps for proxy internet connections

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

Categories