Code example for Loader

Methods: getId

0
        @Override 
        public void onLoadFinished(Loader<RequestToken> loader, RequestToken data) {
            if (data == null) {
                throw new IllegalStateException("リクエストトークンの取得に失敗しました。");
            } 
            getLoaderManager().destroyLoader(loader.getId());
 
            mRequestToken = data;
            startActivity(new Intent(Intent.ACTION_VIEW,
                    Uri.parse(mRequestToken.getAuthorizationURL())));
        } 
 
        @Override 
        public void onLoaderReset(Loader<RequestToken> loader) {
 
        } 
    } 
 
    private class AccessTokenLoaderCallbacks 
            implements LoaderManager.LoaderCallbacks<AccessToken> {