use of com.chute.sdk.v2.model.AssetModel in project photo-picker-plus-android by chute.
the class ServicesActivity method lastVideo.
@Override
public void lastVideo() {
Uri videoUrl = MediaDAO.getLastVideoFromCurosr(getApplicationContext());
if (videoUrl == null || videoUrl.toString().equals("")) {
NotificationUtil.makeToast(getApplicationContext(), getResources().getString(R.string.no_camera_videos));
} else {
String videoThumbnail = MediaDAO.getLastVideoThumbnail(getApplicationContext());
final AssetModel model = new AssetModel();
model.setThumbnail(Uri.fromFile(new File(videoThumbnail)).toString());
model.setUrl(Uri.fromFile(new File(videoThumbnail)).toString());
model.setVideoUrl(videoUrl.toString());
model.setType(MediaType.VIDEO.name().toLowerCase());
IntentUtil.deliverDataToInitialActivity(ServicesActivity.this, model, null);
}
}
use of com.chute.sdk.v2.model.AssetModel in project photo-picker-plus-android by chute.
the class ServicesActivity method lastPhoto.
@Override
public void lastPhoto() {
Uri uri = MediaDAO.getLastPhotoFromAllPhotos(getApplicationContext());
if (uri.toString().equals("")) {
NotificationUtil.makeToast(getApplicationContext(), getResources().getString(R.string.no_camera_photos));
} else {
final AssetModel model = new AssetModel();
//model.setId(MediaDAO.getLastPhotoContentUri(getApplicationContext()).toString());
model.setThumbnail(uri.toString());
model.setUrl(uri.toString());
model.setType(MediaType.IMAGE.name().toLowerCase());
IntentUtil.deliverDataToInitialActivity(ServicesActivity.this, model, null);
}
}
Aggregations