[TIMOB-28051] Android: Add foreground service type constants for "camera" and "microphone"
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-11-30T18:55:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.3.0 |
Components | Android |
Labels | android, audio, audioRecording, camera, service |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2020-07-25T02:10:33.000+0000 |
Updated | 2020-11-30T18:55:07.000+0000 |
Description
*Summary:*
Android 11 has added the following...
* [ServiceInfo.FOREGROUND_SERVICE_TYPE_CAMERA](https://developer.android.com/reference/android/content/pm/ServiceInfo#FOREGROUND_SERVICE_TYPE_CAMERA)
* [ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE](https://developer.android.com/reference/android/content/pm/ServiceInfo#FOREGROUND_SERVICE_TYPE_MICROPHONE)
We should add the above to Titanium as constants...
*
Ti.Android.FOREGROUND_SERVICE_TYPE_CAMERA
* Ti.Android.FOREGROUND_SERVICE_TYPE_MICROPHONE
*Note:*
These constants are to be passed to Titanium's [Service.foregroundNotify()](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android.Service-method-foregroundNotify) method which gives that foreground service permission to use these feature while the app is in the background.
PR (9.3.x): https://github.com/appcelerator/titanium_mobile/pull/11986
FR Passed Waiting for Jenkins build