Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async showActions() {
let promptRet = await Plugins.Modals.showActions({
title: 'Photo Options',
message: 'Select an option to perform',
options: [
{
title: 'Upload'
},
{
title: 'Share'
},
{
title: 'Remove',
style: ActionSheetOptionStyle.Destructive
}
]
})
console.log('You selected', promptRet);
async createAlbum() {
var name = await Plugins.Modals.prompt({
title: 'Album Name',
message: ''
});
let ret = await Plugins.Photos.createAlbum({
name: name.value
});
console.log('Album created');
}
async speak() {
var value = await Plugins.Modals.prompt({
title: "Value to speak",
message: "Enter the value to speak"
});
Plugins.Accessibility.speak({
value: value.value
});
}
}