Renaming Pictures

by ivan » Fri, 13 Feb 2009 07:33:28 GMT


Sponsored Links
 I'm writing a camera app that captures a jpeg and saves it to the
app's current working directory.  Then the app uses
"android.provider.MediaStore.Images.Media.insertImage(ContentResolver
cr, String imagePath, String name, String description)" to save a copy
of the picture to the media directory on the sdcard where the native
Camera stores it's images.  Everything works fine except for the fact
that the insertImage function disregards the name I use for the image
and gives the image some numerical name instead.

Has anyone successfully circumvented this issue?

... any thoughts or code snippets?

thanks.
--~--~---------~--~----~------------~-------~--~----~



Renaming Pictures

by doubleslash » Sat, 07 Mar 2009 10:54:16 GMT


 I have tried to save an image using MediaStore just like you, but it
causes a camera crash. I have to restart the phone to see the inserted
image. If you can save a picture taken by the camera (inside
onPictureCallback) , could you show me how?
Thanks so much




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. [WTA] GPS HTC EVO gak detech di Surabaya

Htc apa nih. Keren juga.
Areanya blank signal gps kali bro



-- 
===============

2. where's icu4jni in gingerbread

i suspect my helloworld in java doesn't work on gingerbread because
dalvik doesn't support UTF-8 charset.
i did observe UnsupportedCharsetExpception raised .
/*in Charset.java*/
        try {
            return Charset.forName(encoding);
        } catch (UnsupportedCharsetException e) {
            return Charset.forName("UTF-8");
        }

According to javadoc, UTF-8 is one of builtin charsets. why it is not
in libcore? i searched the whole tree of gingerbread and didn't find a
subclass of CharsetProvider. guys in google must clean up libcore/icu
because i found the following fact:

Comparing to the directories of icu4jni for both cupcake and
gingerbread:
CUPCAKE:
[liuxin@rd14 icu]$ find
.
./src
./src/main
./src/main/java
./src/main/java/com
./src/main/java/com/ibm
./src/main/java/com/ibm/icu4jni
./src/main/java/com/ibm/icu4jni/lang
./src/main/java/com/ibm/icu4jni/lang/UCharacter.java
./src/main/java/com/ibm/icu4jni/text
./src/main/java/com/ibm/icu4jni/text/NativeDecimalFormat.java
./src/main/java/com/ibm/icu4jni/text/NativeCollation.java
./src/main/java/com/ibm/icu4jni/text/CollationAttribute.java
./src/main/java/com/ibm/icu4jni/text/RuleBasedBreakIterator.java
./src/main/java/com/ibm/icu4jni/text/DecimalFormatSymbols.java
./src/main/java/com/ibm/icu4jni/text/RuleBasedCollator.java
./src/main/java/com/ibm/icu4jni/text/Collator.java
./src/main/java/com/ibm/icu4jni/text/NativeBreakIterator.java
./src/main/java/com/ibm/icu4jni/text/DecimalFormat.java
./src/main/java/com/ibm/icu4jni/text/BreakIterator.java
./src/main/java/com/ibm/icu4jni/text/CollationKey.java
./src/main/java/com/ibm/icu4jni/text/CollationElementIterator.java
./src/main/java/com/ibm/icu4jni/text/RuleBasedNumberFormat.java
./src/main/java/com/ibm/icu4jni/charset
./src/main/java/com/ibm/icu4jni/charset/NativeConverter.java
./src/main/java/com/ibm/icu4jni/charset/CharsetEncoderICU.java
./src/main/java/com/ibm/icu4jni/charset/CharsetICU.java
./src/main/java/com/ibm/icu4jni/charset/CharsetProviderICU.java
./src/main/java/com/ibm/icu4jni/charset/CharsetDecoderICU.java
./src/main/java/com/ibm/icu4jni/common
./src/main/java/com/ibm/icu4jni/common/ErrorCode.java
./src/main/java/com/ibm/icu4jni/util
./src/main/java/com/ibm/icu4jni/util/Resources.java
./src/main/java/com/ibm/icu4jni/regex
./src/main/java/com/ibm/icu4jni/regex/NativeRegEx.java
./src/main/native
./src/main/native/ResourceInterface.cpp
./src/main/native/ErrorCode.h
./src/main/native/RegExInterface.cpp
./src/main/native/DecimalFormatInterface.cpp
./src/main/native/sub.mk
./src/main/native/BidiWrapperInterface.c
./src/main/native/ConverterInterface.c.orig
./src/main/native/CharacterInterface.c
./src/main/native/CollationInterface.h
./src/main/native/ConverterInterface.h
./src/main/native/CollationInterface.c
./src/main/native/RBNFInterface.cpp
./src/main/native/BreakIteratorInterface.c
./src/main/native/ConverterInterface.c
./src/main/native/ErrorCode.c
./src/main/native/BidiWrapperInterface.h
./unicode-license.txt
./license.html
./MODULE_LICENSE_BSD_LIKE
GINGERBREAD:
[liuxin@rd14 icu]$ find
.
./src
./src/main
./src/main/java
./src/main/java/com
./src/main/java/com/ibm
./src/main/java/com/ibm/icu4jni
./src/main/java/com/ibm/icu4jni/ThirdPartyProject.prop

clearly, gingerbread ditched icu4jni for some reasons. anyway, how i
can bring icu4jni back on gingerbread?

-- 

3. Working with Monkey

4. [WTA] lebih baik android gsm / cdma

5. Market paid apps

6. No targets listed while using the SDK built from Android 2.3 source code

7. ANR keyDispatchingTimedOut on android/com.android.internal.app.RingtonePickerActivity