share: function (produto) {
const msg = 'Vi esse produto no App das Lojas REDE e acho que você vai curtir:'
var url = `<a href='lojasrede.mobile://${produto.productId}'>Veja no APP</a>` // api.redirecionaApp(produto.productId)
var options = {
message: msg, // not supported on some apps (Facebook, Instagram)
subject: 'Promoções Lojas REDE', // fi. for email
url: url
}
// var str = 'Veja no App!'
// var url = 'myapp.mobile://' // api.redirecionaApp(produto.productId)
window.plugins.socialsharing.shareWithOptions(options, this.onSuccess, this.onError)
},
onSuccess (result) {
alert('Share completed? ' + result.completed) // On Android apps mostly return false even while it's true
alert('Shared to app: ' + result.app) // On Android result.app since plugin version 5.4.0 this is no longer empty. On iOS it's empty when sharing is cancelled (result.completed=false)
},
onError (msg) {
alert('Sharing failed with message: ' + msg)
},
Problem
The sharing plugin does not understand that my schema that opens the app (myapp.mobile) is a link, even though it wraps it inside an html tag, <a href = 'myapp.mobile: //' > Click </a>. Rendering is done as text rather than as HTML.
How can I make myapp.mobile: be understood as a link? Any suggestion?
I even created an API that does the redirection that even works but it did not go down.
Código Share:
Problem
The sharing plugin does not understand that my schema that opens the app (myapp.mobile) is a link, even though it wraps it inside an html tag,
<a href = 'myapp.mobile: //' > Click </a>
. Rendering is done as text rather than as HTML.How can I make myapp.mobile: be understood as a link? Any suggestion?
I even created an API that does the redirection that even works but it did not go down.