[TIMOB-28105] Android: AudioRecorder "recording" and "stopped" properties return the wrong state values
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-11-23T21:19:45.000+0000 |
Affected Version/s | Release 6.2.0 |
Fix Version/s | Release 9.3.0 |
Components | Android |
Labels | android, audio, audioRecording |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2020-09-01T03:18:04.000+0000 |
Updated | 2020-11-23T21:19:45.000+0000 |
Description
*Summary:*
The following Notice the label "Recording: true" does not become
Notice the label "Recording: true" does not become
Ti.Media.AudioRecorder
properties return the wrong values...
* "recording" never returns false
after calling pause()
or stop()
.
* "stopped" never returns false
ever. It always returns true
.
*Steps to reproduce:*
Create a "Classic" app.
Add the below permission to the "tiapp.xml".
Use attached [^AudioRecorderStatusTest.js] for the "app.js".
Build and run on Android.
Notice the label "Stopped: true". _(This is wrong. It should be false.)_
Tap on the "Start Recording" button.
Tap on the "Pause Recording" button.
Notice the label "Recording: true" does not become false
. _(This is wrong.)_
Tap on the "Resume Recording" button.
Tap on the "Stop Recording" button.
Notice the label "Recording: true" does not become false
. _(This is wrong.)_
<ti:app>
<android>
<manifest>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
</manifest>
</android>
</ti:app>
*Expected Result:*
Only 1 of the below properties should be true at a time...
* "recording" - only true
after calling start()
or resume()
* "paused" - only true
after calling pause()
* "stopped" - only true
after creation or after calling stop()
Attachments
File | Date | Size |
---|---|---|
AudioRecorderStatusTest.js | 2020-09-01T18:39:36.000+0000 | 2381 |
PR (9.3.x): https://github.com/appcelerator/titanium_mobile/pull/11996
FR Passed Waiting for Jenkins build
merged to 9_3_X, automatic backport to master failed due to conflicts - so I manually cherry-picked the commits over and resolved the conflicts.
Verified on: Mac OS: 10.15.4 SDK: 9.3.0.v20201123121926 Appc CLI: 8.1.1 JDK: 11.0.6 Node: 12.16.1 Studio: 6.0.0.202005141803 Device: Pixel 3 XL(v11.0) emulator