Well, I tried to use the account manager and I'm getting a "401 token invalid" error. What could be the reason.
debug log
account name = xxxxxx@gmail.com is token: start DQAAALIAAAAh-xxxxxxx Google DATA API loader ----------- - ----- Inserting the ----------------- token inside the Google Notebook loader: The DQAAALIAAAAh-XXXxx URL is: https://docs.google.com/feeds/ Getting default / private / full exception Docs feed: 401 Token invalid Google Data API loader ----------------- Sample Code:
Log D. ("Main", "\ tInside GoogleData API -----------------"); Http transport transport = new net HTTPS transport (); GoogleHeaders Header = New GoogleHeaders (); Log D. ("Main", "\ t setting token:" + authToken); Headers.setGoogleLogin (authToken); Headers.gdataVersion = "3.0"; Transport.defaultHeaders = Header; AtomPaster Parser = New Atomers (); Parser.namespaceDictionary = Namespace. DICTIONARY; Transport.addParser (parser); Try {DocsUrl url = DocsUrl.forDefaultPrivateFull (); DocumentListFeed feed = DocumentListFeed.executeGet (Transportation, URL); & Lt; DocumentListEntry & gt; Docs = feed.docs; Log D. ("Main", "\ tDocs count =" + docs.ize ()); (Iterator iterator = docs.iterator (); iterator.hasNext ();) {DocumentListEntry documentListEntry = (DocumentListEntry) Iterator .next (); Log D. ("Main", "\ t \ t is the document title:" documentListEntry.title); }} Catch (IOE EXPRESS E) {Log D. ("Main", "exception is getting a Docs feed:" + e.getMessage ()); // handleException (E); } Log D. ("Main", "\ t Don Google Data API -----------------");
You should see how this website works
Comments
Post a Comment