ADDITIONAL SYSTEM INFORMATION :
Since "ask for microphone permissions" feature in MacOS 10.14 Mojave onwards (eg exists on Current v11 Big Sur)
A DESCRIPTION OF THE PROBLEM :
Microphone permissions aren’t granted to applications created by jPackage. The resulting PCM line in samples files are the correct duration, but don’t have any sound (samples all set to 0).
System Preferences -> Security & Privacy -> Privacy -> Microphone
(application never asks for permissions)
There are various reports of this on the Internet - but I’m wondering if the JPackage team is aware of the issue?
https://stackoverflow.com/questions/55727488/application-doesnt-ask-for-permission-to-access-microphone-in-macos-10-14-mojav
This pretty much shows the solution - needs a bit of Objective C though put into the Jpackage osx executable.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Jpackage any app that records audio.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When run the first time, the JPackaged app asks for permission to use the microphone, it is granted, you can then record audio.
ACTUAL -
The jPackaged app never asks for microphone permissions, and the recorded audio is of the right duration etc, but of zero volume.
---------- BEGIN SOURCE ----------
https://docs.oracle.com/javase/tutorial/sound/capturing.html
Any jPackaged audio app.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Have the app bootstrap itself using Runtime.java and grant applications to the Terminal.app (when it calls itself from `java Application.app/MacOS/Resources/Application`)
FREQUENCY : always
Since "ask for microphone permissions" feature in MacOS 10.14 Mojave onwards (eg exists on Current v11 Big Sur)
A DESCRIPTION OF THE PROBLEM :
Microphone permissions aren’t granted to applications created by jPackage. The resulting PCM line in samples files are the correct duration, but don’t have any sound (samples all set to 0).
System Preferences -> Security & Privacy -> Privacy -> Microphone
(application never asks for permissions)
There are various reports of this on the Internet - but I’m wondering if the JPackage team is aware of the issue?
https://stackoverflow.com/questions/55727488/application-doesnt-ask-for-permission-to-access-microphone-in-macos-10-14-mojav
This pretty much shows the solution - needs a bit of Objective C though put into the Jpackage osx executable.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Jpackage any app that records audio.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When run the first time, the JPackaged app asks for permission to use the microphone, it is granted, you can then record audio.
ACTUAL -
The jPackaged app never asks for microphone permissions, and the recorded audio is of the right duration etc, but of zero volume.
---------- BEGIN SOURCE ----------
https://docs.oracle.com/javase/tutorial/sound/capturing.html
Any jPackaged audio app.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Have the app bootstrap itself using Runtime.java and grant applications to the Terminal.app (when it calls itself from `java Application.app/MacOS/Resources/Application`)
FREQUENCY : always
- duplicates
-
JDK-8272639 jpackaged applications using microphone on mac
- Resolved