1

Google Classroom と Google Drive の間の対話機能を含む Android アプリを開発しています。問題は、Google Classroom API がかなり制限されており、他の Google API とまだ十分に統合されていないように見えることです。

Google サインインを介して Google Classroom へのアクセスをリクエストしたい (Google ドライブへのアクセスもリクエストしている)。これをオールインワンで行う簡単な方法はありますか? もしそうなら、どのように?

理解を深めるために、以下のコードを参照してください。

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
            .requestEmail()
            .requestScopes(Drive.SCOPE_FILE)
            // *HERE* is where I want to request Classroom SCOPES
            .build();

    // Build a GoogleApiClient with access to the Google Sign-In API, 
    // Google Dirve API, Google Classroom API, and options specified by gso.
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
            .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
            .addApi(Drive.API)
            // *HERE* is where I want to add the API .addApi(Classroom.API)
            .build();
4

0 に答える 0