Thanks Megha - it started working when I relaunched Android - I have no idea why it wasn't working before - I definitely had the SD card installed because I was selecting from images on the SD card in the photo picker.
On Aug 29, 5:28 pm, "Megha Joshi" <[EMAIL PROTECTED]> wrote: > Did you launch this with sdcard installed? Are there any Pictures in your > Pictures app? > > If not, you should install sdcard, take pictures from the Camera app and > then try app. > I tried executing your code and onActivityResult() is being called. I tested > it on Linux, but the OS shouldn't matter in this case. > When your app launches the Pictures application, pick a picture and you > should see the logcat output of "Got the result"... > > 2008/8/29 Cheryl Sedota <[EMAIL PROTECTED]> > > > > > Hi, I have some code that attempts to invoke the photo picker activity > > for result. I can successfully launch the photo picker activity, but > > my activity does not receive a result at all (onActivityResult() is > > never called). Can anyone help? Thanks!!! - Cheryl > > > [EMAIL PROTECTED] > > public void onCreate(Bundle savedInstanceState) > > { > > super.onCreate(savedInstanceState); > > setContentView(R.layout.main); > > > Button button = (Button) findViewById(R.id.pick_button); > > button.setOnClickListener(new View.OnClickListener() > > { > > > [EMAIL PROTECTED] > > public void onClick(View view) > > { > > Log.i(TAG, "Trying to start the photo picker > > activity"); > > > Intent photoPickerIntent = new > > Intent(Intent.ACTION_PICK); > > // Intent photoPickerIntent = new > > // Intent(Intent.ACTION_GET_CONTENT); > > photoPickerIntent.setType("image/*"); > > startActivityForResult(photoPickerIntent, 1); > > > } > > }); > > } > > > [EMAIL PROTECTED] > > protected void onActivityResult(int i, int j, Intent intent) > > { > > super.onActivityResult(i, j, intent); > > > // TODO: figure out why this method never gets invoked > > Log.i(TAG, "Got the result: " + intent.getDataString()); > > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---