Closed Bug 963527 Opened 11 years ago Closed 10 years ago

NFC: re-dispatch nfc-ndef-discovered mozActivity if app cannot handle it.

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED INVALID
tracking-b2g backlog

People

(Reporter: allstars.chh, Unassigned)

References

Details

This is mentioned by Jonas and Junichi-san, When nfc_manager in system app dispatches the 'nfc-ndef-discovered' MozActivity, if there more than one app have registered this event before, an App Selector Menu would be pop up to let user decides which app he wants to launch. However if the selected app cannot handle this nfc-ndef-discovered event, there would be no chance for user to 're-select' the app again, what user can do is just re-tap the tag again. We should think the posibility if we can re-dispatch the event if the app itself cannot handle it correctly. File this bug as Gecko bug for now.
Aside from the UX question (the user is free to select the same app again), it should be possible as MozActivity is also currently a DOMRequest: https://developer.mozilla.org/en-US/docs/Web/API/MozActivity
Blocks: b2g-nfc
No longer blocks: 860960
CCing Alive(Gaia) and Juwei(UX). Currently we'd like to let user takes the device and re-tap the tag again. Junichi-san, do you have some examples that we need to dispatch the event again, instead of letting user to move the device away and re-tap the tag?
Flags: needinfo?(ju-hashimoto)
Hopefully it is a really rare case, otherwise it would be no sense to show up an option that cannot be opened. If it happened, it should act the same as other NFC error case: re-tap again.
Re-tapping is OK. I don't think re-dispatching is required. I'm just wondering how the user notice that he should tap again when a tag is not handled. Does SystemApp shows the 'please re-tap' message? (is it possible in the current framework?)
Flags: needinfo?(ju-hashimoto)
I think the error message should be showed by the app selected by user. Let's ask Alive for what can System app do for us in this situation.
Flags: needinfo?(alive)
If the tag is not handled correctly, it's app's responsibility to postError to system app. I don't really care who displays the error message, app or system, but if app doesn't do anything, we (system) couldn't know the tag is handled well.
Flags: needinfo?(alive)
If apps take the responsibility, reviews should ensure that apps treat tags correctly. Otherwise the user might encounter strange situations that nothing happen even if he taps many times.
Quick question: If the user already select an app to open the file and failed, is it possible to block certain app when the user try again? which means if one app fail to handle at the first time, it won't show on the selector menu next time.
(In reply to Juwei Huang from comment #8) > Quick question: If the user already select an app to open the file and > failed, is it possible to block certain app when the user try again? which > means if one app fail to handle at the first time, it won't show on the > selector menu next time. This is a general activity issue -- if you really think it's a problem. For now OS cannot do things as to blame the app it declares it has the ability to deal with certain ability but actually it doesn't. For core apps we provided I don't think we need to worry, and for third party app let's be confident with the review of the marketplace.
blocking-b2g: --- → backlog
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.