public static SingleResponse<Boolean> deleteProfileBannerImage( final Context context, final long account_id) { final Twitter twitter = TwitterAPIFactory.getTwitterInstance(context, account_id, false); if (twitter == null) return new SingleResponse<>(false, null); try { twitter.removeProfileBannerImage(); return new SingleResponse<>(true, null); } catch (final TwitterException e) { return new SingleResponse<>(false, e); } }
public static User updateProfileImage( final Context context, final long accountId, final Uri imageUri, final boolean deleteImage) throws FileNotFoundException, TwitterException { final Twitter twitter = TwitterAPIFactory.getTwitterInstance(context, accountId, true); return updateProfileImage(context, twitter, imageUri, deleteImage); }