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
@Override
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()
{
@Override
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);
}
});
}
@Override
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---