Android Studio with Google Calendar API V3 - google-app-engine

I wanted to try out google calendar API v3. I have Android Studio 1.0. I created a java endpoint module from Android Studio. I was following the official documentation here
If you follow the link I provided, you will see a line like this
Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials)
.setApplicationName("applicationName").build();
Now what will be the httpTransport, jsonfactory and credentials here? Official documentation did not specify anything.
I also followed a sample in java from here.
This was done using Java Servlet and Eclipse. I am not familiar with that. It wont work on Android Studio.
Can anyone provide me a sample? or any direction to work with Calender API and Android Studio? Or what to do in the official sample mentioned above?

You should pass GoogleAccountCredential as the last argument
GoogleAccountCredential googleAccountCredential =
GoogleAccountCredential.usingAudience(context, "server:client_id:" + WEB_CLIENT_ID);
googleAccountCredential.setSelectedAccountName(userEmail);
What is WEB_CLIENT_ID you can find in many tutorials over the internet. It's basically ID which you can generate using Google Developers Console for given project.
Here's how to create Calendar instance with transport and JSON factory.
new Calendar.Builder(AndroidHttp.newCompatibleTransport(),
AndroidJsonFactory.getDefaultInstance(), googleAccountCredential);

Related

How to use DocuSign API with React.js?

I need to do a POC of some DocuSign e-Signature features in a React.js environment. For starters, I would like to play with the examples as mentioned here https://github.com/docusign/code-examples-node/tree/master/lib/eSignature. The official documentation is not self explanatory on how to use these in a React.js code repo(exported from create-react-app). Neither could I find some relevant samples for a reference. Would appreciate if anyone can guide me on how can I port the examples in this repo https://github.com/docusign/code-examples-node in a React.js environment.
For React.JS:
You can make a direct API call from your React app. In this case you will not use the node.js SDK (it only works with Node.js). The API call is the create envelope call documented here: https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create/
You can see an example of the API call here: https://github.com/docusign/code-examples-bash/blob/master/examples/eSignature/eg017SetTemplateTabValues.sh#L68
You will also need to implement a private CORS gateway. We have an article on doing so plus code examples: https://www.docusign.com/blog/dsdev-building-single-page-applications-with-docusign-and-cors-part-2
2. Alternative is for your React app to ask your server app to call DocuSign. Your server app could use the Node.js SDK.

Admin SDK Email setting API to delegate Email

I am looking for email delegation using google admin sdk.
I am using admin sdk because still its not available in Gmail API.
I checked google doc
https://developers.google.com/admin-sdk/email-settings/#delegation_examples
But it gives only feed url.
Can anyone please let me know how to call feedURl using Java code.
Or is there any api with can be used to achieve this ?
Thanks
I downloaded GmailSettingsService of package sample.appsforyourdomain.gmailsettings and modified it according to my need.

Testing a Deployed Google DataStore

I'm working on my first android app that uses a Google DataStore for the back end data storage. I've created a backend store and tested it uses the APIs Explorer and on localhost. I then created a project and deployed the backend to the cloud.
What I was expecting was to use the APIs Explorer to add some global configuration information and test the APIs. I typed in:
https://[projectID].appspot.com/_ah/api/explorer
which brings me to the explorer page but none of the services/endpoints show up.
I currently don't have any security defined for the project.
Can I use the API Explorer on a deployed backend? If so, I'm assuming I missed something in the project setup. Any ideas as to what I may have missed?
Thanks for your insights and answers.
You need to use endpoints.API_EXPLORER_CLIENT_ID in your api class decorator in case you need to view api in your deployed version.
Here's the example
#endpoints.api(name = '<api name>',
version = 'v1',
description = '<description>',
allowed_client_ids = [WEB_CLIENT_ID, ANDROID_CLIENT_ID,
IOS_CLIENT_ID, endpoints.API_EXPLORER_CLIENT_ID],
audiences=[ANDROID_AUDIENCE],
scopes=[endpoints.EMAIL_SCOPE])
Hope this helps you.!

creating a filter using the gdata java client library and email settings api

This is my first time with google apis and I am having trouble implementing the email settings api in eclipse .Please tell me exactly which jar files are to be included and how ? I am getting GmailSettingsService class not found error.Please Help
Thank you
From here:
Didn't you ever want some kind of tool to create new Google Data projects in seconds? Google Data Java Client Eclipse
Plug-in is now available for use.
Using this plug-in you can create a new Java project to interact with
any Google Data API of your choice. Now, you don't need to worry about
setting up the dependencies for your Google Data project. This plug-in
handles all the dependencies and also provides you with an option to
download the external dependencies. It also creates a boiler plate
code to interact with the API that you are interested in. This will
give a quick start to all the newbies.

Google Glass Development for another

Wondering if anyone knows about developing a Google Glass app for another person. Someone who is in the Glass Explorer program has asked me to help them with developing an app (which I'm happy to do) but it looks like I will need to sign in as that person in the API Console. Is this correct? Is there any way for me to prototype separately?
There is indeed a way to do this without logging in as your colleague. Join the project team on the API console. Just follow these steps:
Have your Explorer friend create an API Console project and enable the Google Mirror API for that project from the services panel.
Have them go to the team panel for that project. Have them add your account to the project's team.
This enables you to develop on the same project, but since you're not an Explorer you cannot enable or disable the Mirror API for this project.

Resources