Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.content.SharedPreferences;

public class Main {
    public final static String PREF_NAME = "ReadabilityClient";

    public static boolean checkAuthorization(Context context) {
        SharedPreferences tokenInfo = context.getSharedPreferences(PREF_NAME, 0);
        String token = tokenInfo.getString("oauth_token", null);
        String tokenSecret = tokenInfo.getString("oauth_token_secret", null);
        String verifier = tokenInfo.getString("oauth_verifier", null);
        return (token != null && tokenSecret != null && verifier != null);
    }
}