Closed Bug 1109458 Opened 5 years ago Closed 5 years ago

Let privilege App know if NFC is enabled or not.

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(feature-b2g:2.2+)

RESOLVED FIXED
2.2 S2 (19dec)
feature-b2g 2.2+

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

(Whiteboard: [p=1])

Attachments

(1 file, 2 obsolete files)

App should know current hardware state of NFC, so when NFC is OFF, the app could tell the user to enable it.
feature-b2g: --- → 2.2+
Just dicussed with Dimi, we plan to add a method 'isEnabled()' to do this.

Although we already have an attribute called rfState in NfcOptions.webidl, but that seems overkill.
Assignee: nobody → allstars.chh
Attached patch Patch. (obsolete) — Splinter Review
Attachment #8535426 - Flags: review?(dlee)
Attachment #8535426 - Flags: review?(dlee) → review+
Comment on attachment 8535426 [details] [diff] [review]
Patch.

Review of attachment 8535426 [details] [diff] [review]:
-----------------------------------------------------------------

Add r? to smaug for the WebIDL change.
Attachment #8535426 - Flags: review?(bugs)
Attached patch Patch v2. (obsolete) — Splinter Review
updated default value in parent process.
Attachment #8535426 - Attachment is obsolete: true
Attachment #8535494 - Flags: review?(dlee)
Attachment #8535494 - Flags: review?(dlee) → review+
Comment on attachment 8535494 [details] [diff] [review]
Patch v2.

r? to smaug for WebIDL change
Attachment #8535494 - Flags: review?(bugs)
Comment on attachment 8535494 [details] [diff] [review]
Patch v2.

Why method and why not readonly attribute?
But I don't have strong feeling which one would be better.
Attachment #8535494 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #6)
> Why method and why not readonly attribute?
> But I don't have strong feeling which one would be better.

readonly attribute sounds better.
I'll upload another patch.

Thanks
Attached patch Patch. v3.Splinter Review
using readonly attribute.
Attachment #8535494 - Attachment is obsolete: true
Attachment #8536296 - Flags: review?(bugs)
Attachment #8536296 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/b2g-inbound/rev/a4f7e387fade
Whiteboard: [p=1]
Target Milestone: --- → 2.2 S2 (19dec)
https://hg.mozilla.org/mozilla-central/rev/a4f7e387fade
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.