2012-01-04 6 views
2

나는 며칠 동안이 일을하고 있으며 혼란스러워하고 있습니다.Google 연락처 android에서 api

나는 자바 클라이언트가 "안드로이드에서 작동하지 않을 것"이라고 많은 곳에서 읽었으며, 그렇지 않다.

아무도 올바른 방향으로 나를 가리킬 수 있습니까?

public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 


    ContactsService service = new ContactsService("my_app_name"); 


    URL feedUrl = null; 
    try { 
     feedUrl = new URL("https://www.google.com/m8/feeds/contacts/default/full"); 
    } catch (MalformedURLException e) { 
     e.printStackTrace(); 
    } 

    try { 
     service.setUserCredentials("[email protected]", "thePassword"); 

     ContactFeed resultFeed = new ContactFeed(); 

     resultFeed = service 
       .getFeed(feedUrl, ContactFeed.class); 
    } catch (IOException e) { 
     e.printStackTrace(); 
    } catch (ServiceException e) { 
     e.printStackTrace(); 
    } 

} 

와 나는 얻을 :

 
W/XmlParser(793): javax.xml.parsers.ParserConfigurationException: org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/external-parameter-entities 
+0

그래서 무엇을 시도 했습니까? – Selvin

+0

@norbert이 문제에 대한 해결책이 있었습니까? 코드 나 링크를 나에게 알려주시겠습니까? – Noundla

+0

GData API로 문제를 해결했습니다. 이 게시물 (http://noundla.blogspot.in/2014/01/fetch-googlegmail-contacts-using-google.html) – Noundla

답변