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

Notifications

Announcements

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

I have the same question (0)
  • 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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard