Coder Social home page Coder Social logo

cybernhl / google-sheet-java-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sdivakarrajesh/google-sheet-java-api

0.0 0.0 0.0 141 KB

Sample Android App demonstrating how to fetching data from user's Google Sheet using Java API

License: Apache License 2.0

Java 100.00%

google-sheet-java-api's Introduction

Using GSheet Java Api in Android Sample

WHAT THIS APP DOES?

This app contains sample code on how to implement the Google SpreadSheet API and Google Sign-In(Android Client API). For the time being I have just implemented the methods to read and write(Append to be more specific) using the java client library. More code for achieving different features can be found in the official documentation

To use this code

Get the credentials

First go to console.developers.google.com and enable G+ api and Google SpreadSheet Api

Then get the google services JSON from here and add it to the app folder of your android project

Adding the permissions

Be sure that you have added the following permissions in the android Manifest

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Adding the dependencies

Be sure that you have added the following dependencies in the Project level gradle build file

classpath 'com.google.gms:google-services:3.1.0'		

Add the following dependencies in the App level gradle build file

Android{
...
configurations.all {
		resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
	}
...
}		

then add

compile 'com.google.android.gms:play-services-auth:11.6.2'
compile('com.google.apis:google-api-services-sheets:v4-rev493-1.23.0') {
    exclude group: 'org.apache.httpcomponents'
}

compile 'com.google.android.gms:play-services-auth:11.6.2'
compile 'pub.devrel:easypermissions:0.3.0'
compile 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
compile('com.google.api-client:google-api-client-android:1.23.0') {
    exclude group: 'org.apache.httpcomponents'
}

Below everything else add

apply plugin: 'com.google.gms.google-services'

License

Licensed under Apache License 2.0

For more info and queries

Most of the code is self explainatory and also comments are added to get you through the code easily Be sure to ping me too if there are bugs or if the code is not working as expected

email me: [email protected]

My Play Store Developer page: https://play.google.com/store/apps/developer?id=THE%20BLUE-ORB&hl=en

google-sheet-java-api's People

Contributors

sdivakarrajesh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.