I wasn't able to resolve the problem either. Hopefully we can get
some resolution to this
On Oct 10, 6:52 am, androidian <[EMAIL PROTECTED]> wrote:
> Does anyone have a cleaner solution to this problem (i.e. apart from
> modifying/hacking google's own gdata code)? It seems strange that
> you'd have to do that in order to access google APIs from android.
>
> I've added uses-permission android:name="android.permission.INTERNET"
> to my manifest but I still get the error:
> com.google.gdata.util.AuthenticationException: Error connecting with
> login URI
> ...
> Caused by: java.io.IOException: Hostname <www.google.com> was not
> verified
>
> This is just by using the following code in my app:
> SpreadsheetService myService = new SpreadsheetService(
> "mydomain.com-myapp-1");
> myService.setUserCredentials("[EMAIL PROTECTED]",
> "mypassword");
>
> Any ideas? It seems to be trying to get an SSL connection for some
> reason. Can someone point me in the right direction?
>
> cheers,
> Ian
>
> On Sep 12, 6:11 am, haig <[EMAIL PROTECTED]> wrote:
>
> > The getRequestConnection method that was
> > modifiedhttp://pastebin.com/f5efc9f0d
>
> > Error:http://pastebin.com/f6f115f2d
>
> > On Sep 11, 11:40 am, haig <[EMAIL PROTECTED]> wrote:
>
> > > Hi Stunti,
>
> > > I still am receiving errors, but it is slightly different: Host is
> > > unresolved:www.google.com:443
> > > Any thoughts?
>
> > > On Sep 9, 7:34 am, stunti <[EMAIL PROTECTED]> wrote:
>
> > > > You need to modify the code of gdata.
> > > > The certificates used by HttpURLConnection arenotavailable to
> > > > validate thehostnameduring a SSL connexion.
> > > > A small workaround below.
> > > > around line 332 in com.google.gdata.client.http.HttpGDataRequest
>
> > > > You might also want to disable GZIP compression as it seems to messed
> > > > up the content for the XML parser.
> > > > I don't know if it will be fized within the next release.
>
> > > > HttpsURLConnection uc = (HttpsURLConnection)
> > > > requestUrl.openConnection();
> > > > uc.setHostnameVerifier( new X509HostnameVerifier(){
> > > > @Override
> > > > public boolean verify(String host, SSLSession session) {
> > > > // TODO Auto-generated method stub
> > > > return true;
> > > > }
>
> > > > @Override
> > > > public void verify(String host, SSLSocket ssl)
> > > > throwsIOException{
> > > > // TODO Auto-generated method stub
> > > > }
>
> > > > @Override
> > > > public void verify(String host, X509Certificate cert)
> > > > throws SSLException {
> > > > // TODO Auto-generated method stub
> > > > }
>
> > > > @Override
> > > > public void verify(String host, String[] cns, String[]
> > > > subjectAlts)
> > > > throws SSLException {
> > > > // TODO Auto-generated method stub
> > > > }
> > > > });
>
> > > > On Sep 8, 5:24 am, haig <[EMAIL PROTECTED]> wrote:
>
> > > > > I am having similar problems, hope someone can help.
>
> > > > > In my example, "myService" is a GoogleService
>
> > > > > GoogleService myService = new GoogleService("blogger", "exampleCo-
> > > > > exampleApp-1");
>
> > > > > Standalone client works fine, butnotin my android app.
>
> > > > > Error from logcat:
>
> > > > > com.google.gdata.util.AuthenticationException: Error connecting with
> > > > > login URI
> > > > > at
> > > > > com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(Unknown
> > > > > Source)
> > > > > at
> > > > > com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(Unknown
> > > > > Source)
> > > > > at
> > > > > com.google.gdata.client.GoogleService.setUserCredentials(Unknown
> > > > > Source)
> > > > > at
> > > > > com.google.gdata.client.GoogleService.setUserCredentials(Unknown
> > > > > Source)
> > > > > at com.travelrecorder.network.Blogger.publish_post(Blogger.java:
> > > > > 32)
> > > > > at com.travelrecorder.network.AlarmService_Service
> > > > > $1.run(AlarmService_Service.java:71)
> > > > > at java.lang.Thread.run(Thread.java:914)
> > > > > Caused by: java.io.IOException:Hostname<www.google.com> wasnot
> > > > >verified
> > > > > at
> > > > > org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.getSecureSocket(HttpConnection.java:
> > > > > 169)
> > > > > at
> > > > > org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection
> > > > > $HttpsEngine.connect(HttpsURLConnection.java:398)
> > > > > at
> > > > > org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection...
> > > > > 1129)
> > > > > at
> > > > > org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection.getOutputStream(HttpsURLConnect...
> > > > > 262)
> > > > > at
> > > > > com.google.gdata.client.GoogleAuthTokenFactory.makePostRequest(Unknown
> > > > > Source)
> > > > > ... 7 more
>
> > > > > On Aug 25, 1:40 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > > > wrote:
>
> > > > > > You didn't answer what type "myService" is here.
>
> > > > > > Cheers,
> > > > > > Justin
> > > > > > Android Team @ Google- Hide quoted text -
>
> > > > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---