0

I'm developing an app testing on Android 2.3, and it works wells. In Android 4 I have put all the Network calls inside a Asyntask and now almost all works fine. What else do I have to consider?

But when I try to Crop and Images via Intent, first it disconnect from debugger (¿Why?) when I select the images from the gallery or camera, and when I crop it, when its saving picture, it crashes.

Now the Eclipse Log doesn't show Exception, or any message that can help me, on 2.3 always print error messages.

Sorry for my english, I hope you understand me, thank you!

drasick
  • 280
  • 4
  • 14

2 Answers2

1

Are you running the crop/save on the UI Thread? If you do, StrictMode will come after you for doing disk writes on the UI Thread. Spawn an AsyncTask (or a Thread) to do so and try again.

323go
  • 14,143
  • 6
  • 33
  • 41
  • I use Intent intent = new Intent("com.android.camera.action.CROP"); for crop the images, Do you suggest to make the startActivityForResult( cropOptions.get(item).appIntent, CROP_FROM_CAMERA); on a AsyncTask? – drasick Oct 31 '12 at 16:08
  • Sure the intent hasn't changed? Could also be if you're using a phone with bloatware, it use a different camera package. Can you grab the stacktrace/log from the project folder, even if ddms is failing? – 323go Nov 01 '12 at 00:53
1

Consider to review any deprecated methods you may be calling, such as getWidth(), navigation hardware keys or preferences related stuff.

Also consider adding a custom (versioned) style.xml to support holo theme easily. It's best to create a consistent user experience, so under Android 4.0 your visual components should be as 'standard' as possible.

Community
  • 1
  • 1
Shine
  • 3,788
  • 1
  • 36
  • 59