私は音を録音するために次の意図を使用しています
Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(intent, REQUEST_RECORD_SOUND);
コードが (onActivityResult で) プログラムに戻ると、記録は保存されず、ログ cat にエラーが表示されます。これは、Android 2.3 バージョンの Sony XPERIA でのみ発生します。どんな助けでも大歓迎です。以下は、logcat からの出力です。
01-02 21:43:17.837: E/Database(557): Error inserting album_id=8 title=2013-01-02 21:43:17 title_key=Q*?Q*?Q*?Q*?Q?Q*?Q*?Q?Q*?Q*?QQ*?Q*?QØQ*?Q*?QØQ*?Q*?Q mime_type=audio/3gpp _display_name=recording-379099974.3gpp date_modified=1357188193 date_added=1357188197 artist_id=8 is_music=0 _data=/mnt/sdcard/recording-379099974.3gpp
01-02 21:43:17.837: E/Database(557): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
01-02 21:43:17.837: E/Database(557): at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
01-02 21:43:17.837: E/Database(557): at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61)
01-02 21:43:17.837: E/Database(557): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1590)
01-02 21:43:17.837: E/Database(557): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1434)
01-02 21:43:17.837: E/Database(557): at com.android.providers.media.MediaProvider.insertInternal(MediaProvider.java:1981)
01-02 21:43:17.837: E/Database(557): at com.android.providers.media.MediaProvider.insert(MediaProvider.java:1800)
01-02 21:43:17.837: E/Database(557): at android.content.ContentProvider$Transport.insert(ContentProvider.java:198)
01-02 21:43:17.837: E/Database(557): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:146)
01-02 21:43:17.837: E/Database(557): at android.os.Binder.execTransact(Binder.java:324)
01-02 21:43:17.837: E/Database(557): at dalvik.system.NativeStart.run(Native Method)
01-02 21:43:18.057: E/WindowManager(1524): Activity com.android.soundrecorder.SoundRecorder has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@2afe6e80 that was originally added here
01-02 21:43:18.057: E/WindowManager(1524): android.view.WindowLeaked: Activity com.android.soundrecorder.SoundRecorder has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@2afe6e80 that was originally added here
01-02 21:43:18.057: E/WindowManager(1524): at android.view.ViewRoot.<init>(ViewRoot.java:267)