Я настроил фильтры намерений в AndroidManifest.xml:
Код: Выделить всё
И я создал следующий HTML-прототип:
Код: Выделить всё
document.getElementById('sendButton').addEventListener('click', function() {
const fileInput = document.getElementById('fileInput');
if (fileInput.files.length > 0) {
const file = fileInput.files[0];
const url = app://action?operation=sign&filename=${encodeURIComponent(file.name)};
window.location.href = url;
} else {
alert('Please select a file first.');
}
});
Подробнее здесь: https://stackoverflow.com/questions/790 ... -app-links