

Quote from luishp on March 3, 2019, 11:29 amHi @asmat,
Can you be more descriptive about the problem?
Whatsapp social sharing will only work from mobile devices.
Hi @asmat,
Can you be more descriptive about the problem?
Whatsapp social sharing will only work from mobile devices.

Quote from asmat on March 3, 2019, 8:10 pmI know it's work only for mobile device , but when i published the app as android platform and after installing in mobile when I click the share button nothings happen....
The buttton's code is this: slWhatsAppShare [check] "[textMessage]"
here [textMessage] is TextInput ...
I know it's work only for mobile device , but when i published the app as android platform and after installing in mobile when I click the share button nothings happen....
The buttton's code is this: slWhatsAppShare [check] "[textMessage]"
here [textMessage] is TextInput ...

Quote from luishp on March 4, 2019, 12:05 pmWhat value is stored into [check] variable after pressing the button?
This is the corresponding JavaScript code for the slWhatsAppShare command:
function slWhatsAppShare(message){ if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { var whats_app_message = encodeURIComponent(message); var whatsapp_url = "whatsapp://send?text="+whats_app_message; window.location.href= whatsapp_url; return "true"; }else{ return "false"; } }
What value is stored into [check] variable after pressing the button?
This is the corresponding JavaScript code for the slWhatsAppShare command:
function slWhatsAppShare(message){
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
var whats_app_message = encodeURIComponent(message);
var whatsapp_url = "whatsapp://send?text="+whats_app_message;
window.location.href= whatsapp_url;
return "true";
}else{
return "false";
}
}

Quote from asmat on March 4, 2019, 10:46 pmI know the value of [check] variable doesn't belong to me, it belongs to app, if the app use into a mobile device that time the [check] variable is True..else false...
how can I use this code instead of that?
function slWhatsAppShare(message){ if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { var whats_app_message = encodeURIComponent(message); var whatsapp_url = "whatsapp://send?text="+whats_app_message; window.location.href= whatsapp_url; return "true"; }else{ return "false"; } }
I know the value of [check] variable doesn't belong to me, it belongs to app, if the app use into a mobile device that time the [check] variable is True..else false...
how can I use this code instead of that?
function slWhatsAppShare(message){
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
var whats_app_message = encodeURIComponent(message);
var whatsapp_url = "whatsapp://send?text="+whats_app_message;
window.location.href= whatsapp_url;
return "true";
}else{
return "false";
}
}

Quote from luishp on March 5, 2019, 8:03 amIt is the same code!
VisualNEO Web commands internally call JavaScript code.
This is the code for slWhatsAppShare action command.
You can try avoiding mobile detection using this:BeginJS whats_app_message = encodeURIComponent("My message"); whatsapp_url = "whatsapp://send?text="+whats_app_message; window.location.href= whatsapp_url; EndJS
It is the same code!
VisualNEO Web commands internally call JavaScript code.
This is the code for slWhatsAppShare action command.
You can try avoiding mobile detection using this:
BeginJS
whats_app_message = encodeURIComponent("My message");
whatsapp_url = "whatsapp://send?text="+whats_app_message;
window.location.href= whatsapp_url;
EndJS