use of com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential in project SeriesGuide by UweTrottmann.
the class HexagonTools method buildAccountService.
/**
* Creates and returns a new instance for this hexagon service or null if not signed in.
*/
@Nullable
public synchronized Account buildAccountService() {
GoogleAccountCredential credential = getAccountCredential(true);
if (credential.getSelectedAccount() == null) {
return null;
}
Account.Builder builder = new Account.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential);
return CloudEndpointUtils.updateBuilder(app, builder).build();
}
use of com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential in project SeriesGuide by UweTrottmann.
the class HexagonTools method getMoviesService.
/**
* Returns the instance for this hexagon service or null if not signed in.
*/
@Nullable
public synchronized Movies getMoviesService() {
GoogleAccountCredential credential = getAccountCredential(true);
if (credential.getSelectedAccount() == null) {
return null;
}
if (moviesService == null) {
Movies.Builder builder = new Movies.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential);
moviesService = CloudEndpointUtils.updateBuilder(app, builder).build();
}
return moviesService;
}
use of com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential in project SeriesGuide by UweTrottmann.
the class HexagonTools method getEpisodesService.
/**
* Returns the instance for this hexagon service or null if not signed in.
*/
@Nullable
public synchronized Episodes getEpisodesService() {
GoogleAccountCredential credential = getAccountCredential(true);
if (credential.getSelectedAccount() == null) {
return null;
}
if (episodesService == null) {
Episodes.Builder builder = new Episodes.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential);
episodesService = CloudEndpointUtils.updateBuilder(app, builder).build();
}
return episodesService;
}
use of com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential in project SeriesGuide by UweTrottmann.
the class HexagonTools method getShowsService.
/**
* Returns the instance for this hexagon service or null if not signed in.
*/
@Nullable
public synchronized Shows getShowsService() {
GoogleAccountCredential credential = getAccountCredential(true);
if (credential.getSelectedAccount() == null) {
return null;
}
if (showsService == null) {
Shows.Builder builder = new Shows.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential);
showsService = CloudEndpointUtils.updateBuilder(app, builder).build();
}
return showsService;
}
use of com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential in project SeriesGuide by UweTrottmann.
the class HexagonTools method getListsService.
/**
* Returns the instance for this hexagon service or null if not signed in.
*/
@Nullable
public synchronized Lists getListsService() {
GoogleAccountCredential credential = getAccountCredential(true);
if (credential.getSelectedAccount() == null) {
return null;
}
if (listsService == null) {
Lists.Builder builder = new Lists.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential);
listsService = CloudEndpointUtils.updateBuilder(app, builder).build();
}
return listsService;
}
Aggregations