[B2GDroid] Can't send a message via B2GDroid's default message app.

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: xiongfuchao, Assigned: reuben)

Tracking

Details

Attachments

(4 attachments)

Created attachment 8673582 [details]
logcat_0056.txt

[1.Description]:
When user taps message's send icon to send a message, they will find device has no response, message can't be sent.
Found time:00:56
See attcchment:AriesKK_0056.3gp & logcat_0056.txt

[2.Testing Steps]: 
Prerequisite:Insert a valid SIM card.
1. Open Message app.
2. Tap on the Compose icon.
3. Enter the recipient and content.
4. Tap send icon.
 
[3.Expected Result]: 
4.Message can be sended successfully.

[4.Actual Result]: 
4.Device hasn't any response, and message can't be sended.

[5.Reproduction build]: 
Android version: 4.4.4(Build Number 23.0.A.2.93)
B2GDroid version:0.11

[6.Reproduction Frequency]: 
Always Recurrence,5/5

[7.TCID]: 
10742

[8.Note]:
This function works normally on latest build of flame v2.5 & aries v2.5.
(Reporter)

Comment 1

3 years ago
Created attachment 8673583 [details]
AriesKK_0056.3gp
(Reporter)

Updated

3 years ago
status-b2g-master: --- → unaffected
Component: General → General
Product: Firefox OS → B2GDroid
(Assignee)

Comment 2

3 years ago
The problem seems to be somewhere in Gaia. navigator.mozMobileMessage.send never gets called.
Assignee: nobody → reuben.bmo
status-b2g-master: unaffected → ---
(Assignee)

Comment 3

3 years ago
Julien (please redirect if you're not the right person), I've been looking at this and I can't make sense of what the app is doing. The event handler for the send button never actually sends a message:

https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/views/conversation/js/conversation.js#L2236

The MultiSimActionButton click callback does get called, but bails out because navigator.mozIccManager and its "phoneNumberGetter" are undefined.

How exactly do we end up calling navigator.mozMobileMessage.send? Or is mozIccManager being undefined likely to be the problem?
Flags: needinfo?(felash)
(In reply to Reuben Morais [:reuben] from comment #3)
> Julien (please redirect if you're not the right person), I've been looking
> at this and I can't make sense of what the app is doing. The event handler
> for the send button never actually sends a message:
> 
> https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/views/conversation/
> js/conversation.js#L2236
> 
> The MultiSimActionButton click callback does get called, but bails out
> because navigator.mozIccManager and its "phoneNumberGetter" are undefined.
> 
> How exactly do we end up calling navigator.mozMobileMessage.send? Or is
> mozIccManager being undefined likely to be the problem?

Yes :)

When MultiSimActionButton succeeds, we end up calling [1].

[1] https://github.com/mozilla-b2g/gaia/blob/ef8d5801f34219d7162415f56e6811a0e7cae305/apps/sms/views/conversation/js/conversation.js#L2264

On desktop we use [2] to simulate mozIccManager, maybe you'd like to reuse this ? Unless you plan to implement this API in B2GDroid too.

[2] https://github.com/mozilla-b2g/gaia/blob/ef8d5801f34219d7162415f56e6811a0e7cae305/apps/sms/desktop-mock/navigator_moz_icc_manager.js


Please ask if you have any more question :)
Flags: needinfo?(felash)
(Assignee)

Comment 5

3 years ago
Created attachment 8682241 [details] [diff] [review]
Enable ICC Manager on B2GDroid

I looked into using the shim, but got lost in the Gaia build system. This patch, believe it or not, Just Works™.

The message is sent, but for some reason doesn't get saved. I'll look into that next.

Hmm, I should've thought of this earlier, but I bet I can just move the ICC manager shim out of the desktop-mock folder so it gets included all the time, and that should work.
Yes, for such a small script, I don't mind if it's always included ;)
Created attachment 8682486 [details] [review]
[gaia] reuben:bug1214557 > mozilla-b2g:master
(Assignee)

Comment 8

3 years ago
Comment on attachment 8682486 [details] [review]
[gaia] reuben:bug1214557 > mozilla-b2g:master

Not sure if services/js/ is the best place to put this, let me know what you think.
Attachment #8682486 - Flags: review?(felash)
Comment on attachment 8682486 [details] [review]
[gaia] reuben:bug1214557 > mozilla-b2g:master

Let's put it directly in /sms/mocks (instead of /sms/services/js).

r=me once it's there :)
Attachment #8682486 - Flags: review?(felash) → review+
Hey Reuben, just in case you forgot about this ;)
Flags: needinfo?(reuben.bmo)
(Assignee)

Comment 11

3 years ago
Hi Julien, I did not forget. I've been sick since the weekend and couldn't sit in front of the computer without feeling sick, but I'm getting better now and will I'll get to this today. Thanks for the reminder.
Flags: needinfo?(reuben.bmo)
No problem, have a good rest and come back strong :)
(Assignee)

Comment 13

3 years ago
Merged! https://github.com/mozilla-b2g/gaia/commit/bc1d39caef86be61b0d532becd37ea3bfea54a68

PS: Don't sign up for a bike race in the Brazilian summer heat unless you're very well trained.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Depends on: 1226197
You need to log in before you can comment on or make changes to this bug.