When sending pre-filled SMS messages through Google's Web Share API, which lets users choose their app, there are a ton of options including Google Drive and Bluetooth. I want to limit these options to sms/ social media apps (Android Messages, Whatsapp, etc.)
So far my research has been inconclusive so I haven't made any headway in trying this out, this is also my first time trying to use these tools so go figure.
Here's the part of the function that contains the android sharing functionality;
if (ver == undefined){ //not iOS
if (device.isAndroid){
if (navigator.share != undefined) //navigator.share pops up the app choice tray on device
{
navigator.share({
text: shareSMSMsg
})
.catch(err => console.error(err));
}
else{
window.location.href = "sms:?body="+ androidEncode(shareSMSMsg); //if shareWebAPI feature isnt ll just try and use the default sms service
}
}
else{
window.location.href = "sms:?body="+ encode(shareSMSMsg);
}
}
Ideally it would limit the choices to just sms/messaging apps to make the experience a bit cleaner and open up less opportunity for user error.