Android Open Source - android-google-spreadsheets-api Spreadsheet O Auth






From Project

Back to project page android-google-spreadsheets-api.

License

The source code is released under:

Apache License

If you think the Android project android-google-spreadsheets-api listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.github.spreadsheets.android.api.oauth;
/*from  www  .j  a v  a  2 s.  c  om*/
import com.android.volley.AuthFailureError;

public class SpreadsheetOAuth {
    public static final String READ_SCOPE = "oauth2:https://spreadsheets.google.com/feeds";
    public static final String READ_WRITE_SCOPE =
                            "oauth2:https://spreadsheets.google.com/feeds https://docs.google.com/feeds";

    private static String oauthToken;

    public static String getAuthToken() throws AuthFailureError {
        if (oauthToken != null) {
            return oauthToken;
        } else {
            throw new AuthFailureError("No authentication token available");
        }
    }

    public static void setAuthToken(final String token) {
        oauthToken = token;
    }
}




Java Source Code List

com.example.android.spreadsheet.sample.MainActivity.java
com.github.spreadsheets.android.api.model.Author.java
com.github.spreadsheets.android.api.model.BatchOperation.java
com.github.spreadsheets.android.api.model.BatchStatus.java
com.github.spreadsheets.android.api.model.CellEntry.java
com.github.spreadsheets.android.api.model.CellFeed.java
com.github.spreadsheets.android.api.model.Cell.java
com.github.spreadsheets.android.api.model.Content.java
com.github.spreadsheets.android.api.model.Entry.java
com.github.spreadsheets.android.api.model.Feed.java
com.github.spreadsheets.android.api.model.Link.java
com.github.spreadsheets.android.api.model.ListEntry.java
com.github.spreadsheets.android.api.model.ListFeed.java
com.github.spreadsheets.android.api.model.List.java
com.github.spreadsheets.android.api.model.SpreadsheetEntry.java
com.github.spreadsheets.android.api.model.SpreadsheetFeed.java
com.github.spreadsheets.android.api.model.SpreadsheetUrl.java
com.github.spreadsheets.android.api.model.WorksheetData.java
com.github.spreadsheets.android.api.model.WorksheetEntry.java
com.github.spreadsheets.android.api.model.WorksheetFeed.java
com.github.spreadsheets.android.api.oauth.SpreadsheetOAuthActivity.java
com.github.spreadsheets.android.api.oauth.SpreadsheetOAuth.java
com.github.spreadsheets.android.api.requests.CellEntryRequest.java
com.github.spreadsheets.android.api.requests.CellFeedRequest.java
com.github.spreadsheets.android.api.requests.ListEntryRequest.java
com.github.spreadsheets.android.api.requests.ListFeedRequest.java
com.github.spreadsheets.android.api.requests.SpreadsheetEntryRequest.java
com.github.spreadsheets.android.api.requests.SpreadsheetFeedRequest.java
com.github.spreadsheets.android.api.requests.SpreadsheetRequest.java
com.github.spreadsheets.android.api.requests.WorksheetEntryRequest.java
com.github.spreadsheets.android.api.requests.WorksheetFeedRequest.java