JasonMP wrote:
> Hi,
> 
> I'm a mess.
> 
> I'm using the blow code to open the gallery and grab an image for an
> incon im gong to store in a database and access later to populate a
> listview attached to a simpleCursorAdapter.
> //inside contextmenu
>                 Intent intent = new Intent();
>               intent.setType("image/*");
>               intent.setAction(Intent.ACTION_GET_CONTENT);
>               startActivityForResult(intent, 1);
> //activityresult
> protected void onActivityResult(int requestCode, int resultCode,Intent
> data)
>       {
>       if(requestCode == 1){
>               if(resultCode == RESULT_OK) {
>                       db.open();
>               db.updateDB(data.getData().toString());  //this updates
> the columns in the DB that will later get used for the adapter
>               db.close();
>               }
>       }
> 
>       }
> 
> 
> The code runs, and then starts force closing (what seems like)
> randomly.  I'm convinced that I've gotten something confused somewhere
> but since the force closure happens at all different points of my app
> I dont know where to start looking.

Start by looking at your Java stack trace to see what's blowing up. You
can access that via adb logcat, DDMS, or the DDMS perspective in Eclipse.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in Germany, 18-22 January 2010: http://bignerdranch.com

-- 
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

Reply via email to