Closed Bug 867948 Opened 12 years ago Closed 12 years ago

New SMS via MozActivity not handled correctly

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(blocking-b2g:leo+, b2g18+ fixed)

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 + fixed

People

(Reporter: gerard-majax, Assigned: gerard-majax)

References

Details

Attachments

(1 file)

Triggering a new SMS from MozActivity with a body while the SMS application is already running somehow does not work. If the SMS app is already in an opened thread, then the new message compose window is half-displayed and mixed with the thread list. If the SMS app is alreadi opened on the thread lst, I don't even see the new message compose window. Code to reproduce: https://gitorious.org/scrapfilbleu/scrapfilbleu/blobs/master/FilATours_HTML5/js/filatours.js#line642
Can you confirm this is fixed or needs additional attention? (with gaia/master)
Flags: needinfo?
It's not fixed since no one worked on this as far as I can tell. It's even worse with gaia master from a couple of days old: E/GeckoConsole(15581): [JavaScript Error: "TypeError: results is null" {file: "app://sms.gaiamobile.org/js/activity_handler.js" line: 50}]
Flags: needinfo?
Please note that the sharing is performed like this https://gitorious.org/scrapfilbleu/scrapfilbleu/blobs/master/FilATours_HTML5/js/filatours.js#line644 shareJourney: function() { var cjd = this._journeyDetailsInfo[this._currentJourneyDetailsId]; var payload = this.journeyToHuman(cjd); var subject = encodeURI(_('steps-subject')); console.log("Will share: (" + JSON.stringify(cjd) + ") as (" + payload + ")"); var a = new MozActivity({ name: 'new', data: { url: "mailto:?subject=" + subject + "&body=" + encodeURI(payload), // for emails, body: payload, // for SMS type: [ "websms/sms", "mail" ] } }); },
After checking a bit, it turns out that it now works well, only if I add an empty "number" field in the payload of my MozActivity. So this error seems to be only related to this missing field.
blocking-b2g: --- → leo?
Alex, if you feel like taking this bug for next week's sprint, please do ;)
(In reply to Julien Wajsberg [:julienw] from comment #5) > Alex, if you feel like taking this bug for next week's sprint, please do ;) Why not, I'll look at this tomorrow.
The good news that we already have all the handling for a "body" param in Message app code, just need to figure out why it doesn't get through Reference: https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/activity_handler.js#L35-L67
(In reply to Rick Waldron from comment #7) > The good news that we already have all the handling for a "body" param in > Message app code, just need to figure out why it doesn't get through > > Reference: > https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/activity_handler. > js#L35-L67 I have my ideas, I'm starting to hack around in the train :)
So, basically when the filter is somehow invalid, findBy the method of Contacts defined in contacts.js returns a NULL, as of https://github.com/mozilla-b2g/gaia/commit/e1d70b7 What I'm unsure is why there is this behavior. Is there any specification of the expected behavior somewhere ? If so, then it's the callee's job to ensure we did got a NULL ...
Assignee: nobody → lissyx+mozillians
Flags: needinfo?(waldron.rick)
Please find the pull request at https://github.com/mozilla-b2g/gaia/pull/10019
Attachment #754397 - Flags: review?(waldron.rick)
Flags: needinfo?(waldron.rick)
Attachment #754397 - Flags: review?(waldron.rick) → review?(felash)
Comment on attachment 754397 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10019 reviewed on github a small change needed
Attachment #754397 - Flags: review?(felash)
Comment on attachment 754397 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10019 r=me with the nit fixed
Attachment #754397 - Flags: review+
blocking-b2g: leo? → leo+
We believe this is a regression, so marking as leo+.
master: 1ea8a7e6cc3f918651d60f1c0b7352f9ea9020d6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 876350
Uplifted 1ea8a7e6cc3f918651d60f1c0b7352f9ea9020d6 to: v1-train: c36d95181a6c95b4c618cf27ecf51d3dbc61b8f4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: