First step in my quest to tame SMS Forwarding : the reception part. How does Firefox OS handle the reception of messages coming from the GSM chip of the phone? I don't want to dive in the Kernel / Gonk layer yet and prefer to focus on the Gaia part.
Let's check on the Mozilla Developer Network documentation, which should be the source of authority for this domain. According to the dedicated page about the SMS Web API, the objects are still prefixed (moz) which is no surprise considering the non standard ribbon at the top. It's been introduced in Firefox 12 (April 2012) and offers a mix of managers, messages and filters with appropriate callbacks and events.
Further digging even provide simple technical demos made by John Hammink with only the gist of the procedure. My lucky day! The basis look straightforward enough to start bootstrapping my prototype right away.
But how is it implemented in a real world application like the stock one in Gaia? The code base of the SMS app is not that huge, nevertheless it should be easier to grep only the interesting bits for now. Astonishingly, the mozSms pattern is nowhere to be found in the source! What the fox?
As you brilliant mind has already guessed, the API has changed and now relies on the mozMobileMessage namespace, a broader concept that encompasses MMS. Details of this transition are partially detailed in this Bug.
I was complaining of not being sufficiently able to live in the edge and eventually got beaten by the hard and cruel reality of toying with developer preview device. The hunt for breaking changes promises to be fun!