This is a requirement that needs to be implemented on an Android phone.
I need to use the abc.js function under Doctype to call the scan code plug-in function in cordova to scan the QR code. Is it feasible?
Thank you.
I tested successfully.
1.frappe/public/js/frappe/desk.js +447 (example: redirect_to_login), Add âmobile_to_scanner: function() {},â
2. The js file under Doctype:
$(âdiv[data-fieldname=âscanner_btnâ]â).on(âclickâ,function(){
var test = frappe.app.mobile_to_scanner();
console.log(test);
});
3.erpnext mobile app, mobile-master/www/js/desk.js +90 (eg: redirect_to_login)
frappe.app.mobile_to_scanner = function() {
//cordova code
return âfrappe.app.mobile_to_scannerâ;
}
1 Like