Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28105] Android: AudioRecorder "recording" and "stopped" properties return the wrong state values

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2020-11-23T21:19:45.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sRelease 9.3.0
ComponentsAndroid
Labelsandroid, audio, audioRecording
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-09-01T03:18:04.000+0000
Updated2020-11-23T21:19:45.000+0000

Description

*Summary:* The following 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

FileDateSize
AudioRecorderStatusTest.js2020-09-01T18:39:36.000+00002381

Comments

  1. Joshua Quick 2020-09-01

    PR (9.3.x): https://github.com/appcelerator/titanium_mobile/pull/11996
  2. Satyam Sekhri 2020-10-14

    FR Passed Waiting for Jenkins build
  3. Christopher Williams 2020-10-15

    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.
  4. Satyam Sekhri 2020-11-23

    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

JSON Source