No, I have nothing in onPause(). I guess I'll just have to keep playing with it.
Bobbie On Mar 31, 4:05 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote: > Do you have code in your 'onPause()' method of your activity. > If so, it looks like this code is blocking (never returning). > > On Mar 31, 11:39 am, Bobbie <bobbie.st...@gmail.com> wrote: > > > When I choose the image, this is what I get in the debug log: > > > 03-31 11:34:36.055: INFO/ActivityManager(55): Displayed activity > > com.android.camera/.ImageGallery2: 2455 ms > > 03-31 11:34:39.525: VERBOSE/ImageGallery2(11143): / > > ImageBlockManager.onPause > > 03-31 11:34:49.519: WARN/ActivityManager(55): Launch timeout has > > expired, giving up wake lock! > > > On Mar 31, 10:24 am, Streets Of Boston <flyingdutc...@gmail.com> > > wrote: > > > > Did you debug it? > > > Did you get a null-pointer-exception? > > > > (The code i gave you may have some issues: I just typed it in, without > > > using any IDE such as Eclipse. But it should give you a general idea > > > of what to do) > > > > On Mar 30, 10:16 pm, Bobbie <bobbie.st...@gmail.com> wrote: > > > > > I must have a bad phone or something... Now the program force closes > > > > on me? Here's what I have for "onActivityResult." > > > > > Cursor cursor = getContentResolver().query(intent.getData(), null, > > > > null, null, null); > > > > int idx = cursor.getColumnIndex(ImageColumns.DATA); > > > > String fname = cursor.getString(idx); > > > > > On Mar 30, 9:08 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote: > > > > > > int idx = cursor.getColumnIndex(ImageColumn.DATA); > > > > > String fname = cursor.getString(idx); > > > > > > On Mar 30, 7:45 pm, Bobbie <bobbie.st...@gmail.com> wrote: > > > > > > > Wow... It's so simple, but still got an error... I got this: > > > > > > > Cursor cursor = getContentResolver().query(datatoget, null, null, > > > > > > null, null); > > > > > > String fname = cursor.getString(ImageColumns.DATA); > > > > > > > It won't let me run the code... "getString" is underlined in red and > > > > > > it just wants me to change it to "getLong" but if I do that, it just > > > > > > tells me to change it back to "getString" again... Am I doing > > > > > > something wrong here, or am I that bad at coding Android? > > > > > > > On Mar 30, 4:37 pm, Streets Of Boston <flyingdutc...@gmail.com> > > > > > > wrote: > > > > > > > > This works as designed. > > > > > > > > The getDataString() is the string of the content Uri that refers > > > > > > > to > > > > > > > theimage. > > > > > > > If you want the physical filename, do a 'Cursor cursor = > > > > > > > getContentResolver().query(intent.getData(), null, null, null, > > > > > > > null)' > > > > > > > and query the column ImageColumns.DATA on the returned cursor. > > > > > > > > Thecursor.getString(ImageColumns.DATA) will return the physical > > > > > > > file- > > > > > > > path on your SC-card. > > > > > > > > On Mar 30, 3:58 pm, Bobbie <bobbie.st...@gmail.com> wrote: > > > > > > > > > I am having issues with some "photo picker" code that I am > > > > > > > > using. All > > > > > > > > of my pictures are stored on an SD card. The SD card is > > > > > > > > mounted and I > > > > > > > > can take pictures no problem. However, when I select a picture > > > > > > > > from > > > > > > > > the picker and output the location of the file, I should get: > > > > > > > > > "/sdcard/dcim/Camera/FILENAME.jpg" > > > > > > > > > But instead, I get: > > > > > > > > > "content://media/external/images/media/7" > > > > > > > > > Any ideas what could be causing this? Here is my code, a button > > > > > > > > invokes the "takePic()" function: > > > > > > > > > ================================ > > > > > > > > > public void takePic() { > > > > > > > > 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); > > > > > > > > > textview.append(intent.getDataString()); > > > > > > > > }- Hide quoted text - > > > > > > > - Show quoted text -- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---