Software Archive
Read-only legacy content
17061 Discussions

Prompt command failed [ Cordova ]

João_Carlos_Cordeiro
569 Views

I used the Cordova Library command prompt and an error occurred.  Does anyone know why? Thanks ...

Command :

navigator.notification.prompt(
    'Please enter your name',  // message
    onPrompt,                  // callback to invoke
    'Registration',            // title
    ['Ok','Exit'],             // buttonLabels
    'Jane Doe'                 // defaultText
    );

 

Error :

Notification.prompt

The program under test has called the native part of a Cordova plugin that is unknown to the emulator.

It appears that we are missing emulation for that API.

Push the Fail button to continue the API by calling the fail callback. 
Push the Success button to continue the API by calling the success callback.

 

0 Kudos
2 Replies
Elroy_A_Intel
Employee
569 Views

The emulator won't display this prompt because it doesn't have the appropriate functionality to render the expected user experience. You will need to test this functionality on a real device.

0 Kudos
João_Carlos_Cordeiro
569 Views

Thank you so much, Elroy.

0 Kudos
Reply