google-api-java-client

Fixing dependency for Google API task-android-sample

拈花ヽ惹草 提交于 2019-12-08 03:58:26
问题 I'm trying to compile and run the task-android-sample code from Google's API website. I couldn't get it to work with Maven so I ended up downloading all the jar files. Below are the steps I did: 1) Import the downloaded task-android-sample project into Eclipse 2) Add google-api-java-client-1.4.1-beta.zip jar files to my project (Build path, add external jars) 3) Download Task API jar file and import to my project: http://code.google.com/p/google-api-java-client/wiki/APIs#Tasks_API 4) Check

members.list() in Google Admin SDK Directory API (Java)

只谈情不闲聊 提交于 2019-12-07 11:19:22
问题 I have a piece of code(in Java) to list all members of a group on a personal Google Apps Domain. This uses the google Directory API. Here is the snippet: public static void listMembers(String groupKey,Directory service) throws IOException { Members res = service.members().list(groupKey).execute(); List<Member> members = res.getMembers(); int count = 0; if (members == null || members.size() == 0) { System.out.println(); System.out.println("No members found."); } else { System.out.println();

Inserting a new calendarEntry in google calendar API v3 returns a 404

限于喜欢 提交于 2019-12-07 09:35:32
问题 I use the google-api-services-calendar v3 for java. I list without problems my calendarEntries. But the insertion of a new calendarEntry fails. I use the same code as the samples : CalendarListEntry newCal = new CalendarListEntry(); newCal.setId(calTitle); newCal.setSummary(calTitle); newCal.setTimeZone("Europe/Paris"); CalendarListEntry execute = null; try { execute = service.calendarList().insert(newCal).execute(); } catch (IOException e) { e.printStackTrace(); } The calendar is not created

Google drive rest API, Download files from root folder only

拟墨画扇 提交于 2019-12-06 22:12:41
I am trying to download files in the root directory only. Currently I am not specifying any folders as I do not know how to so it downloads the most recent files that are in other folders that aren't the root. All I would like are the files in the root. The code that is getting the files and the download URLs is below: public static void startDownload() throws IOException, ParseException { Drive serv = getDriveService(); FileList result = serv.files().list().setMaxResults(10).execute(); //there are 10 files in the root folder List<File> listA = result.getItems(); if (listA == null || listA

Create users using Service Account with Google Admin SDK?

人走茶凉 提交于 2019-12-06 14:27:47
问题 The documentation is a little unclear on this. Can I actually do this? The only examples I've seen so far are from the Google documentation that show it using the GoogleAuthorizationCodeFlow class to gain authorization. I've seen a few examples of using the Service Account to update and retrieve a list of users, but nothing for creating. Is this possible? If so, does anyone know of any examples floating around? I can't seem to find anything that addresses it. 回答1: You can follow the steps

Which Is the best way to use file storage for Android app by Google API? Google Drive sdk or Google cloud Storage API?

懵懂的女人 提交于 2019-12-06 13:15:14
I want to build the Android App which downloads many files from server securely. I want use the Google api! Right know I confused which one use when in Google Drive sdk API's or Google cloud storage? Requirement : I want to download the files (20mb to 40mb Zip files) securely with authentication to file server or cloud server. I want to know is it possible with google api's available. I found that some sample codes available for Google Drive sdk for Android but no samples available for Google Cloud Storage api in android! Any guidance for google cloud storage download for Android App Any help

Google Drive Upload returns 50x server errors intermittently

邮差的信 提交于 2019-12-06 11:48:34
问题 I'm using the java google drive API to upload some files into various Google Drive folders. The user whose credentials I'm using has access to all the folders. I am uploading around 100 PDFs and 100 CSV files from two different servers running CentOS. These are typically updates though I do occasionally insert the files. These files are between 35k and 700 bytes in size, so not large. About a week ago, I started getting exceptions when uploading the CSV files (but not the PDF files). The

Using Java blogger API v3 to post on blog dynamically

爱⌒轻易说出口 提交于 2019-12-06 09:30:16
问题 I have two issues regarding using Java blogger API v3 to dynamically posting posts to my blogger account. First I used the following code to get credential for accessing my blog: GoogleCredential credential = new GoogleCredential.Builder() .setTransport(httpTransport) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(emailAddress) .setServiceAccountPrivateKeyFromP12File( new File(p12FileLocation)) .setServiceAccountScopes(Collections.singleton(BloggerScopes.BLOGGER)) .build(); credential

User Sign-out: clearing the default Google account does not cause the account picker to show up in Android app

南笙酒味 提交于 2019-12-06 08:24:25
I followed the below link to implement a "sign out" button in my android app, which uses a Google API client. However, upon connecting the google api again, the user is not presented with an account picker. It looks like the value of her/his original choice is somehow still cached perhaps. I've been trying to figure this out for a few hours. Any and all ideas very welcome. Thank you. https://developers.google.com/+/mobile/android/sign-in if (mGoogleApiClient.isConnected()) { Plus.AccountApi.clearDefaultAccount(mGoogleApiClient); mGoogleApiClient.disconnect(); } I've had many problems using

login Google account in webview using account manager token

人走茶凉 提交于 2019-12-06 05:26:26
问题 I got the Access token from account Manager to access all google java client api, but I need to open WebView having google which has to be logged in through the access Token got from account manager. Anyone have any idea of this. I tried using cookies (through this), but I couldn't achieve it. If you know that way, please share the code snippet. 回答1: I found the way to do this through cookies by use of ubertoken. this function should call in separate thread public void setCookiesToWebView