In some code I call this;
                                        Intent photoPickerIntent = new Intent
(Intent.ACTION_PICK);
                                    photoPickerIntent.setType("image/*");
                                    startActivityForResult(photoPickerIntent,
1);

then implement this method....

protected void onActivityResult(int requestCode, int resultCode,
Intent intent)
        {
             super.onActivityResult(requestCode, resultCode, intent);

             if (resultCode == RESULT_OK)
             {
                     Uri photoUri = intent.getData();
                     Log.d(TAG, "should be adding a photo");
                     if (photoUri != null)
                     {

                             Log.d(TAG, "photo uri is not blank");
                                 // do something with the content Uri
                             //TODO figure out why this does not work!!
                             Log.d(TAG, "the photo URI is " + 
photoUri.getPath());
                         Drawable thePic = Drawable.createFromPath
(photoUri.getPath());
                         //thePic is Null
                                     if(thePic != null){
                             Log.d(TAG, "the pic has loaded");
                                 myRecipe.addPic(thePic);
                                 ((RecipeAdapter)myListView.getAdapter
()).notifyDataSetChanged();

                         }
                     }
             }
        }


trying to get a image and load it in to a drawable object. The Uri
that is returned seems logical

03-25 08:12:58.554: DEBUG/ConvertScaleScreen(174): the photo URI is /
external/images/media/1

but when i start up a shell with adb the file location or even the
root drive does not exitst, am I missing something here? should the be
a symbolic link on the file system?

--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to