@Override
  protected EarthWallpaper doInBackground(Void... params) {
    Gson gson = new Gson();
    OkHttpClient okHttpClient = new OkHttpClient();
    String id;
    String requestUrl;
    if (useWallId == null) {
      id = IdUtils.getRandomId();
    } else {
      id = useWallId;
    }

    requestUrl = ApiUtils.getApiUrl(id);

    try {
      Request request = new Request.Builder().url(requestUrl).build();
      Response response = okHttpClient.newCall(request).execute();
      if (!response.isSuccessful()) return null;
      EarthWallpaper wallpaper = gson.fromJson(response.body().charStream(), EarthWallpaper.class);
      if (wallpaper != null && wallpaper.getWallpaperId().equals(id)) return wallpaper;
    } catch (IOException io) {
      Log.d("AsyncLoader", "IOError: " + io.getLocalizedMessage());
    }

    return null;
  }