Closed Bug 1120315 Opened 11 years ago Closed 11 years ago

Notify tag/peer lost when app is switched to background

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox36 wontfix, firefox37 wontfix, firefox38 fixed, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S5 (6feb)
Tracking Status
firefox36 --- wontfix
firefox37 --- wontfix
firefox38 --- fixed
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: dlee, Assigned: allstars.chh)

References

Details

(Whiteboard: [p=2])

Attachments

(4 files, 2 obsolete files)

If an app registers ontagfound then it will receive notification when device touch a NFC tag. But if this app is switch to background for some reason, gecko should sent the app "taglost" notification.
Should we send taglost if an APP has registered ontagfound but he cannot handle previous tagfound notification ?
This should be a follow-up for Bug 1082445, now we have a Browser API for NFC, so we should use the API to notify taglost/peerlost, instead of listening to visibilitychange.
Assignee: dlee → allstars.chh
Depends on: 1082445
No longer depends on: 1082440
Summary: Notify tag lost when app is switched to background → Notify tag/peer lost when app is switched to background
Comment on attachment 8554478 [details] [diff] [review] Part 3: notify tag/peerlost when losing focus. Review of attachment 8554478 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/nfc/gonk/Nfc.js @@ +176,5 @@ > target.sendAsyncMessage("NFC:DOMEvent", options); > }, > > setFocusApp: function setFocusApp(id, isFocus) { > + if (this.focusApp != NFC.SYSTEM_APP_ID) { missing |!isFocus| ? checked with alive before, the UI behavior when changing focus app may look likes 1.setFocusApp(id of previous app, false); 2.setFocusApp(id of new app, true); --> may send this once or twice
Attachment #8554478 - Flags: review?(dlee)
Attachment #8554474 - Flags: review?(dlee) → review+
Attachment #8554477 - Flags: review?(dlee) → review+
Comment on attachment 8555090 [details] [diff] [review] Part 3: notify tag/peerlost when losing focus. v3. Review of attachment 8555090 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thanks
Attachment #8555090 - Flags: review?(dlee) → review+
Hi, smaug Can you help to review the comments updated in MozNFC.webidl? Thanks
Attachment #8555642 - Flags: review?(bugs)
Attachment #8555642 - Flags: review?(bugs) → review+
Comment on attachment 8554474 [details] [diff] [review] Part 1: revert Bug 1082445 NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 1082445 User impact if declined: Possibly cannot receive NFC events. Testing completed: Manually. Risk to taking this patch (and alternatives if risky): No. String or UUID changes made by this patch: No.
Attachment #8554474 - Flags: approval-mozilla-b2g37?
Comment on attachment 8554477 [details] [diff] [review] Part 2: rename to changed. NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 1082445 User impact if declined: Possibly cannot receive NFC event. Testing completed: Manually Risk to taking this patch (and alternatives if risky): No String or UUID changes made by this patch: Updated uuid in nsINfcContentHelper.idl, which is an internal IDL.
Attachment #8554477 - Flags: approval-mozilla-b2g37?
Comment on attachment 8555090 [details] [diff] [review] Part 3: notify tag/peerlost when losing focus. v3. NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 1082445 User impact if declined: Possibly cannot receive NFC event. Testing completed: Manually. Risk to taking this patch (and alternatives if risky): No. String or UUID changes made by this patch: internal IDL - nsINfcContentHelper.idl.
Attachment #8555090 - Flags: approval-mozilla-b2g37?
Comment on attachment 8555642 [details] [diff] [review] Part 4: update comments in MozNFC.webidl NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 1082445 User impact if declined: No, this patch just updated documentation. Testing completed: Manually. Risk to taking this patch (and alternatives if risky): No. String or UUID changes made by this patch: No.
Attachment #8555642 - Flags: approval-mozilla-b2g37?
Attachment #8554474 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Attachment #8554477 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Attachment #8555090 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Attachment #8555642 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: