I've just checked it out again on htc with sence and in emulator.
The following code (it is just a part ofthe code, might not be
working, but give an idea) works fine in emulator storing the file
test.jpg in SD card root, but with HTC Sense I get one /sdcard/
test.jpg and one in /sdcard/DCIM/100MEDIA.
Besides Intent that comes to onActivityResult is null. So, you never
get uri of captured image to be able to move it or delete safe. :(
I have no other idea how to create big image in destination separate
to media folder on on a phone with HTC sense rather to use Camera
class. (Maybe Mark knows :) )
public boolean onMenuItemSelected(int featureId, MenuItem item) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
File file = new File(Environment.getExternalStorageDirectory(),
"test.jpg");
Uri outputFileUri = Uri.fromFile(file);
intentputExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
startActivityForResult(intent, CAMERA_ACTIVITY);
}
protected void onActivityResult(int requestCode, int resultCode,
Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (resultCode == RESULT_CANCELED) {
return;
}
if (intent != null) {
Bundle b = intent.getExtras();
Bitmap bm = (Bitmap) b.get("data");
mImageView.setImageBitmap(bm); // Display image in the
View
}
}
Victor
On Oct 27, 2:53 am, gjs <[email protected]> wrote:
> Hi,
>
> Store the resulting jpg file in a .nomedia folder, see
>
> http://developer.android.com/guide/topics/data/data-storage.html
>
> Hiding your files from the Media Scanner
> Include an empty file named .nomedia in your external files directory
> (note the dot prefix in the filename). This will prevent Android's
> media scanner from reading your media files and including them in apps
> like Gallery or Music.
>
> Regards
>
> On Oct 27, 6:40 am, TreKing <[email protected]> wrote:
>
> > On Tue, Oct 26, 2010 at 1:52 PM, Aaron <[email protected]> wrote:
> > > Just for additional clarification I want to able to take photos and store
> > > them on the sd card and not pollute the users camera folder
>
> > with these images.
>
> > Aren't the photos stored on the camera folder on the SD card? So can't you
> > just move the file from that folder to your own once it's saved?
>
> > ---------------------------------------------------------------------------
> > ----------------------
> > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> > transit tracking app for Android-powered devices
--
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