For your storePicture function it is better to run the MediaScanner to add an image file to the MediaStore, see
http://developer.android.com/reference/android/media/MediaScannerConnection.html Just create a MediaScannerConnection, provide a MediaScannerConnectionClient, and scan the file. The MediaScannerConnectionClient will give you the Uri in onScanCompleted. You can also use the MediaScanner in the getContentUriFromFile function. If should give you the Uri that already exists for the file, if not, it will add it automatically. It is much more future proof than adding an image manually using the MediaStore database. On Mar 15, 12:47 am, Nivek <[email protected]> wrote: > You can use Astro File Manager or Estrongs File Explorer to backup the > Photoshop app on your sdcard. > > Then, transfer the apk on your computer and install it on a running > emulator using adb. > > adb install Photoshop.apk > > Now, I implemented a workaround for the problem I detected before: > Photoshop can't edit its own results. > > Actually, I found out that Photoshop was storing its result in > MediaStore, so it should have been able to send its result as a content:// > uri since MediaStore gives one ! > > My workaround is to search in the MediaStore for the picture saved by > Photoshop. I use the fact that MediaStore stores the path of images in > their DATA column. > > Here is the code > :http://code.google.com/p/emailalbum/source/browse/EmailAlbumAndroid/t... > > Here is the call when receiving Photoshop's > result:http://code.google.com/p/emailalbum/source/browse/EmailAlbumAndroid/t... > > Kevin > > On 13 mar, 15:59, nayana urs <[email protected]> wrote: > > > > > can we test this feature in emulator > > with regards > > Nayana > > > On Fri, Mar 12, 2010 at 6:18 PM, Nivek <[email protected]> wrote: > > > > They could have added the result to the MediaStore and returned that > > > > uri... I'll have to do it myself or my edit button disappears after > > > > editing a picture... > > > > Actually, this is what I will have to do as a workaround, but I can't > > > see any reason why they shouldn't accept a file:// uri as an input ! > > > > Kevin > > > > On 13 mar, 03:10, Nivek <[email protected]> wrote: > > > > There is an inconsistency in their Uri handling... The app accepts > > > > only content:// Uris but provides the result as a file:// Uri... so it > > > > can't edit it's own result again without us having to work this > > > > around... > > > > > They could have added the result to the MediaStore and returned that > > > > uri... I'll have to do it myself or my edit button disappears after > > > > editing a picture... > > > > > I think Adobe should fix this. > > > > > Kevin > > > > > On 11 mar, 16:43, webmonkey <[email protected]> wrote: > > > > > > The document provided by Adobe does not mention how you should read > > > > > the returned Uri. For compatibility with future versions and other > > > > > image editors, you should not assume that it is a 'file:' scheme Uri, > > > > > it could also be a 'content:' scheme Uri. The ContentResolver will > > > > > handle it. here is the code: > > > > > > @Override > > > > > public void onActivityResult(int requestCode, int resultCode, Intent > > > > > data) > > > > > { > > > > > super.onActivityResult(requestCode, resultCode, data); > > > > > if (requestCode == LAUNCH_EDITOR) > > > > > { > > > > > if (resultCode == Activity.RESULT_OK) > > > > > { > > > > > Uri savedImage = data.getData(); > > > > > // savedImage is the Uri for the newly created > > > > > // edited version of the original image. > > > > > > ContentResolver cr = getContentResolver(); > > > > > > InputStream in = null; > > > > > try { > > > > > in = cr.openInputStream(savedImage); > > > > > // you now have an InputStream to the saved image > > > > > // you can copy it by saving to an OutputStream > > > > > // or you can load it as a Bitmap > > > > > Bitmap bitmap = BitmapFactory.decodeStream(in); > > > > > > } catch (IOException e) > > > > > { > > > > > } > > > > > } > > > > > else > > > > > { > > > > > // Edit Operation canceled by user > > > > > } > > > > > } > > > > > > } > > > > > > On Mar 5, 9:10 pm, Adobe DI Mobile <[email protected]> wrote: > > > > > > > ThePhotoshop.com Mobile editor is now available to the Android > > > > > > developer community as an activity that handles actions of type > > > > > > Intent.ACTION_EDIT, for image content that has data of mime-type > > > image/ > > > > > > *. > > > > > > > For more information on incorporating the editor into your Android > > > > > > application, please visit: > > >http://mobile.photoshop.com/android/developers.html > > > > -- > > > 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]<android-developers%2Bunsubs > > > [email protected]> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en -- 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

