web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Capture Audio is not w...
Power Apps
Unanswered

Capture Audio is not working

(0) ShareShare
ReportReport
Posted on by 479

HI Guys,

 

Am using CaptureAudio feature of the PCF as below but its throwing an error - Required method not supported on device

any help is appreciated.

var self = this;

 var promise1 = new Promise<File>(function (resolve, reject) {
 setTimeout(function () {
 debugger;
 
 self._context.device.captureAudio()
 }, 300);
 });

 promise1.then(function (value) {
 debugger;
 console.log(value);
 // expected output: "foo"
 });

 

Regards,

Pavan Kumar Garlapati

  • ScottDurow Profile Picture
    1,039 on at

    Hi Pavan,

    Have you declared the required api in the control manifest?

     

     <feature-usage>
     <uses-feature name="Device.captureAudio" required="true" />
  • JP-09110045-0 Profile Picture
    Microsoft Employee on at

    Hi Pavan,

     

    The device.captureAudio call will the current device to see if there is support for it and if that check returns false, the method will return that error.  By default the tooling harness will return false for these checks, so when running in the harness this is an expected message.

     

    While you can't test captureAudio in the harness, you can specify in the manifest required="false" and manually check in the method is available by checking if captureAudio is null or not.

     

    If required="false" for captureAudio in the ControlManifest.xml file:

     

    self._context.device.captureAudio !== null ? self._context.device.captureAudio() : null;

     

     

  • PavanKumar Profile Picture
    479 on at

    Hi @jopursle  @ScottDurow ,

     

    No luck I have deployed it in Model driven app and still am getting same error ""Required method not supported on device"" Any help on this please?

     

    Regards, Pavan Kumar Garlapati

  • JP-09110045-0 Profile Picture
    Microsoft Employee on at

    Hi Pavan,

     

    Device's captureAudio method currently isn't supported on browsers and will work on mobile only.  You can add the null check I mentioned earlier to make sure you don't hit any exceptions and limit your code to only run captureAudio on mobile.

     

    Joseph

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard