SendIntent issue

14 views
Skip to first unread message

Ferhat

unread,
Aug 24, 2026, 9:31:38 AM (3 days ago) Aug 24
to DroidScript

I’ve tried many different methods, but I still haven’t been able to solve the problem. I’m trying to send a video via WhatsApp, but nothing happens. Did I do something wrong?



Example code:
function shareVideoToWhatsApp(videoPath) {
    var contentUri = app.Path2Uri(videoPath);
    alert("URI: " + contentUri);

    var extras = [
        { name: "android.intent.extra.STREAM", type: "uri", value: contentUri }
    ];

    app.SendIntent(
        "com.whatsapp",
        null,
        "android.intent.action.SEND",
        null,
        null,
        "video/mp4",
        extras,
        "Result",
        function(resultCode, data) {
            alert("Result: " + resultCode);
        }
    );
}

shareVideoToWhatsApp("a.mp4");
Reply all
Reply to author
Forward
0 new messages