27
rated 0 times
[
30]
[
3]
/ answers: 1 / hits: 24588
/ 6 Years ago, thu, february 15, 2018, 12:00:00
I have been trying to trigger the Intent Share in the Android browser from javascript using the navigator.share
.
Following is an example code:
$(#printTest).click(function(e){
if (navigator.share === undefined){
alert('Undefined!');
}
else{
alert('Sharing!');
navigator.share({title: 'Example Page', text: 'https://example.com'});
}
});
When I try to click on the button from chrome in ubuntu, it opens a window for sharing(which shows no apps to select though). But the same is not working on any android mobile browser. I have tested in Chrome for Android version 64 and Chrome for Android Dev also. All of the shows the alert 'Undefined' even after enabling the flag chrome://flags/#enable-experimental-web-platform-features
.
More From » android-intent