Reputation: 2942
Here is my code.
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
intent.addCategory(Intent.CATEGORY_OPENABLE);
startActivityForResult(
Intent.createChooser(
intent,
"Select Image"),
SELECT_IMAGE_LOCAL);
For some reason it is always returning -1. Any ideas what I am doing wrong?
Upvotes: 0
Views: 309
Reputation: 1755
RESULT_OK has a value of -1:
http://developer.android.com/reference/android/app/Activity.html#RESULT_OK
Why it is that way is a good question for the android designers... perhaps an internal joke.
Upvotes: 0