A course booking SMS service with Firefox OS:
- Customer sends:
<name> <course_name> <course_time> <tickets> - System replies:
Thank you <name>! Your booking (<tickets> tickets) for <course_name> at <course_time> is confirmed.
Implementation
navigator.mozMobileMessage.onreceived = (sms) => {
let cust = sms.message.sender,
[name, courseName, courseTime, tcktCnt] = sms.message.body.split(' '),
msg = `Thank you ${name}! Your booking (${tcktCnt} tickets) for ${courseName} at ${courseTime} is confirmed.`;
navigator.mozMobileMessage.send(cust, msg);
};
This was built at a hackathon - the easiest way to test is running the official SMS app in debug mode.
#javascript#firefoxos
About Hemanth HM
Hemanth HM is a Sr. Machine Learning Manager at PayPal, Google Developer Expert, TC39 delegate, FOSS advocate, and community leader with a passion for programming, AI, and open-source contributions.