Giter Site home page Giter Site logo

ibox's Introduction

Overview

A simple version of the Google Drive client written in Java.

It applies the Google Drive Java API (https://developers.google.com/drive/web/quickstart/quickstart-java).

Environment Setup

  1. Install the Eclipse 4+ (http://www.eclipse.org/), and make sure Maven plugin is available.
  2. (Optional) The Maven plugin is not availble in your Eclipse, install it using the update site (http://www.eclipse.org/m2e/download/).
  3. Install the latest Maven command-line tool (http://maven.apache.org/download.cgi)

Importing the Project into Eclipse

  1. File->Import->Maven->Existing Maven Projects
  2. Select the directory containing the pom.xml file
  3. Finish

Building the Project for the First Time

  1. Right-click on the project root folder->Maven->Update Project

Configure Google Drive API Credential

  1. Please follow the instructions to setup the Google account credential at: https://developers.google.com/drive/web/quickstart/quickstart-java#step_1_enable_the_drive_api
  2. When creating the Client ID, choose: "OAuth Create new Client Id" -> "Installed application" (Other)
  3. Copy and paste the CLIENT ID and CLIENT SECRET in GoogleDriveServiceProvider.java

Running the Project Locally

  1. Locate the App.java in src/main/java source folder and right-click on it->Run As->Run Configurations, and fill a folder name in Program Parameters, such as "/mydrive/" or "C:\doc".
  2. When the program is running, you can copy/modify/delete files in that folder and check if the changes have been synced to your Google Drive account.

Note

  1. In order to simplify the function, all the files will be sync-ed to the root folder in your Google Drive.
  2. Only the first-level files will be monitored in your local folder. Sub-directories will not be monitored.
  3. The project has been configured to use JDK 7. If you use other versions installed, please modify the pom.xml file. However, JDK 7+ (or 8) is recommended.

Resources

To learn the core techniques used in this program, please read:

  1. Watching a Directory for Changes. http://docs.oracle.com/javase/tutorial/essential/io/notification.html
  2. Quickstart: Run a Drive App in Java. https://developers.google.com/drive/web/quickstart/quickstart-java

ibox's People

Contributors

chenmeister avatar sunyu912 avatar

Watchers

James Cloos avatar  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.