GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-13T23:34:04.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 12 API, 2013 Sprint 12, Release 3.2.0 |
Components | Android |
Labels | exalture, module_media, qe-manualtest |
Reporter | Nikhil Sharma |
Assignee | Sunila |
Created | 2012-09-27T21:26:57.000+0000 |
Updated | 2014-08-13T23:34:04.000+0000 |
Can't play an audio file from the applicationDataDirectory in android 2.x but it does work in android 4.x
Repo Steps
1. Run the attached app.js in your project.
2. Click the button "Play a cricket sound".
3. In android 2.x. it doesn't play but in android 4.x it works.
using ti 2.1.4 testing on xperia S (android 4.0) no sound is played: DDMS shows awesomeplayer: setDataSource_l('data/data/
I am having the exact same issue. Is there a workaround/suggestion for this?
For 4.0 and below, MediaPlayer uses the native player which requires files to have worldreadable access, workaround is to open an input stream to the file and give that to the player. https://github.com/appcelerator/titanium_mobile/pull/4368
Verified the fix. We can play the audio file on a 2.X device. Thus closing. Environment: Appcel Studio : 3.2.0.201310230601 Ti SDK : 3.2.0.v20131022171645 Mac OSX : 10.8.5 CLI - 3.2.0 with hash 72f7426b4ee6c2d2883c666d5b7e03906a16012f Android device running : 2.X