Android Open Source - bv-android-sdk Photos Intent Wrapper From Project Back to project page bv-android-sdk .
License The source code is released under:
Apache License
If you think the Android project bv-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package com.chute.android.photopickerplus.util.intent;
/ / w w w . j a v a 2 s . c o m
import java.util.ArrayList;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Parcelable;
import com.chute.android.photopickerplus.app.GridActivity;
import com.chute.sdk.collections.GCAccountMediaCollection;
import com.chute.sdk.model.GCAccountMediaModel;
public class PhotosIntentWrapper extends IntentWrapper {
public static final String TAG = PhotosIntentWrapper.class.getSimpleName();
public static final int ACTIVITY_FOR_RESULT_PHOTO_KEY = 115;
public static final int ACTIVITY_FOR_RESULT_STREAM_KEY = 113;
// social photos
private static final String KEY_ACCOUNT_ID = "accountId" ;
private static final String KEY_ALBUM_ID = "albumId" ;
private static final String KEY_PHOTO_COLLECTION = "photoCollection" ;
private static final String KEY_PHOTO_MODEL = "photoModel" ;
private static final String FLAG_MULTI_PICKER = "flagMultiPicker" ;
// cursor photos
private static final String EXTRA_KEY_PATH_LIST = "key_path_list" ;
private static final String EXTRA_KEY_PATH = "key_path" ;
private static final String EXTRA_KEY_CURSOR_PHOTOS = "cursor_photos" ;
// types
public static final int TYPE_CAMERA_ROLL = 0;
public static final int TYPE_ALL_PHOTOS = 1;
public static final int TYPE_SOCIAL_PHOTOS = 2;
private static final String EXTRA_KEY_CHUTE_ID = "key_chute_id" ;
public PhotosIntentWrapper(Context context) {
super (context, GridActivity.class);
}
public PhotosIntentWrapper(Intent intent) {
super (intent);
}
public String getAccountId() {
return getIntent().getExtras().getString(KEY_ACCOUNT_ID);
}
public void setAccountId(String accountId) {
getIntent().putExtra(KEY_ACCOUNT_ID, accountId);
}
public String getAlbumId() {
return getIntent().getExtras().getString(KEY_ALBUM_ID);
}
public void setAlbumId(String albumId) {
getIntent().putExtra(KEY_ALBUM_ID, albumId);
}
public GCAccountMediaCollection getMediaCollection() {
return getIntent().getExtras().getParcelable(KEY_PHOTO_COLLECTION);
}
public void setMediaCollection(GCAccountMediaCollection mediaCollection) {
getIntent().putExtra(KEY_PHOTO_COLLECTION, (Parcelable) mediaCollection);
}
public boolean getIsMultiPicker() {
return getIntent().getExtras().getBoolean(FLAG_MULTI_PICKER);
}
public void setMultiPicker(boolean flag) {
getIntent().putExtra(FLAG_MULTI_PICKER, flag);
}
public void setAssetPathList(ArrayList<String> pathList) {
getIntent().putStringArrayListExtra(EXTRA_KEY_PATH_LIST, pathList);
}
public ArrayList<String> getAssetPathList() {
return getIntent().getExtras().getStringArrayList(EXTRA_KEY_PATH_LIST);
}
public void setAssetPath(String path) {
getIntent().putExtra(EXTRA_KEY_PATH, path);
}
public String getAssetPath() {
return getIntent().getExtras().getString(EXTRA_KEY_PATH);
}
public int getFilterType() {
return getIntent().getExtras().getInt(EXTRA_KEY_CURSOR_PHOTOS);
}
public void setFilterType(int type) {
getIntent().putExtra(EXTRA_KEY_CURSOR_PHOTOS, type);
}
public GCAccountMediaModel getMediaModel() {
return getIntent().getExtras().getParcelable(KEY_PHOTO_MODEL);
}
public void setMediaModel(GCAccountMediaModel model) {
getIntent().putExtra(KEY_PHOTO_MODEL, model);
}
public String getChuteId() {
return getIntent().getExtras().getString(EXTRA_KEY_CHUTE_ID);
}
public void setChuteId(String id) {
getIntent().putExtra(EXTRA_KEY_CHUTE_ID, id);
}
public void startActivityForResult(Activity context, int code) {
context.startActivityForResult(getIntent(), code);
}
}
Java Source Code List com.bazaarvoice.BazaarException.java com.bazaarvoice.BazaarParams.java com.bazaarvoice.BazaarRequest.java com.bazaarvoice.DisplayParams.java com.bazaarvoice.Media.java com.bazaarvoice.OnBazaarResponse.java com.bazaarvoice.SubmissionMediaParams.java com.bazaarvoice.SubmissionParams.java com.bazaarvoice.example.browseproducts.BazaarFunctions.java com.bazaarvoice.example.browseproducts.BazaarProduct.java com.bazaarvoice.example.browseproducts.BazaarReview.java com.bazaarvoice.example.browseproducts.BazaarUIThreadResponse.java com.bazaarvoice.example.browseproducts.ImageDownloader.java com.bazaarvoice.example.browseproducts.MainActivity.java com.bazaarvoice.example.browseproducts.OnImageDownloadComplete.java com.bazaarvoice.example.browseproducts.ProductAdapter.java com.bazaarvoice.example.browseproducts.ProductsActivity.java com.bazaarvoice.example.browseproducts.ReviewAdapter.java com.bazaarvoice.example.browseproducts.ReviewDisplayActivity.java com.bazaarvoice.example.browseproducts.ReviewsActivity.java com.bazaarvoice.example.reviewsubmission.BazaarFunctions.java com.bazaarvoice.example.reviewsubmission.BazaarReview.java com.bazaarvoice.example.reviewsubmission.CameraUtils.java com.bazaarvoice.example.reviewsubmission.ImageDownloader.java com.bazaarvoice.example.reviewsubmission.MainActivity.java com.bazaarvoice.example.reviewsubmission.OnImageDownloadComplete.java com.bazaarvoice.example.reviewsubmission.OnImageUploadComplete.java com.bazaarvoice.example.reviewsubmission.RatingActivity.java com.bazaarvoice.example.reviewsubmission.RatingPreviewActivity.java com.bazaarvoice.example.reviewsubmission.ReviewSubmissionApp.java com.bazaarvoice.intentexample.BazaarFunctions.java com.bazaarvoice.intentexample.BazaarUIThreadResponse.java com.bazaarvoice.intentexample.CameraUtils.java com.bazaarvoice.intentexample.MainActivity.java com.bazaarvoice.types.Action.java com.bazaarvoice.types.ApiVersion.java com.bazaarvoice.types.Equality.java com.bazaarvoice.types.FeedbackContentType.java com.bazaarvoice.types.FeedbackType.java com.bazaarvoice.types.FeedbackVoteType.java com.bazaarvoice.types.IncludeStatsType.java com.bazaarvoice.types.IncludeType.java com.bazaarvoice.types.MediaParamsContentType.java com.bazaarvoice.types.RequestType.java com.chute.android.photopickerplus.adapter.AlbumsAdapter.java com.chute.android.photopickerplus.adapter.PhotoSelectCursorAdapter.java com.chute.android.photopickerplus.adapter.PhotosAdapter.java com.chute.android.photopickerplus.app.AlbumsActivity.java com.chute.android.photopickerplus.app.ChooseServiceActivity.java com.chute.android.photopickerplus.app.GridActivity.java com.chute.android.photopickerplus.app.PhotoPickerPlusApp.java com.chute.android.photopickerplus.dao.MediaDAO.java com.chute.android.photopickerplus.util.AppUtil.java com.chute.android.photopickerplus.util.Constants.java com.chute.android.photopickerplus.util.NotificationUtil.java com.chute.android.photopickerplus.util.intent.AlbumsActivityIntentWrapper.java com.chute.android.photopickerplus.util.intent.IntentUtil.java com.chute.android.photopickerplus.util.intent.IntentWrapper.java com.chute.android.photopickerplus.util.intent.PhotoActivityIntentWrapper.java com.chute.android.photopickerplus.util.intent.PhotoPickerPlusIntentWrapper.java com.chute.android.photopickerplus.util.intent.PhotosIntentWrapper.java com.example.productwidgetexample.BazaarFunctions.java com.example.productwidgetexample.BazaarProduct.java com.example.productwidgetexample.BazaarReview.java com.example.productwidgetexample.BazaarUIThreadResponse.java com.example.productwidgetexample.ImageDownloader.java com.example.productwidgetexample.OnImageDownloadComplete.java com.example.productwidgetexample.ProductWidgetProvider.java com.example.productwidgetexample.ReviewAdapter.java com.example.productwidgetexample.ReviewsActivity.java