WebAPI/WebNFC/WebNFCv2 draft
From MozillaWiki
Contents
Current NFC API
- nfc-manager-tech-discovered: https://docs.google.com/a/mozilla.com/drawings/d/1orXCAC5ldgJG_HdaqAtwndXoTcSERZE5UDK2GgersRc/
- onpeerready: https://docs.google.com/a/mozilla.com/drawings/d/1_7rHuYCE6roM8Dx6sDF6or3xjGKSz5CYW_w2a4uJthA/
- NFCPeer.sendFile: https://docs.google.com/a/mozilla.com/drawings/d/1BxNajPjeGt9QLs9CraoRFeS9RJQN8AYRmFGlP06Hh5w/edit
Current System App and Gaia app
New API proposal
- Why a new API? https://docs.google.com/a/mozilla.com/drawings/d/1n539u4yf2sLJscdB_NvOJO0FtPiNv8qvhDIk64ldrKg
- MozNFC API. https://docs.google.com/a/mozilla.com/drawings/d/1MtuVpIgDCIPeJ1Yf_KybkkbfJOlclKcfnHBAXA2AMSg/
- MozNFCTag API. https://docs.google.com/a/mozilla.com/drawings/d/1LzdH_J_Un32iWW1TRiycCklYB1yjiVWFlkdbZ11mGa0/
System app and Gaia app using new NFC API
TBD
Use cases
- Use case 1: Dispatch tag through MozActivity. https://docs.google.com/a/mozilla.com/drawings/d/1t_2IUquV515UHhgqqqoTOjLrpTLCqa8_bt4RhiwPpYo/
- Use case 2: Dispatch tag to foreground app. https://docs.google.com/a/mozilla.com/drawings/d/1Tf4AnRBIS225dWrcBqr7QuR7dch6EPsX_AeQPk2_bhs/
- Use case 3: Dispatch tag to System app if foreground cannot handle it. https://docs.google.com/a/mozilla.com/drawings/d/1pyKZke1T7dSktTRU5e_Cw2YhmPZEIzMQUDTajf8Khj8/
- Use case 4: Send ontag/peerfound to the previous foreground app. https://docs.google.com/a/mozilla.com/drawings/d/1HylWI_Q2YezHNOa1DPbRRlO3qzNXD6jPAVQu7WAkw_8/
- Use case 4-1: Don't send ontaglost to the previous foreground app if it didn't receive ontagfound before. https://docs.google.com/a/mozilla.com/drawings/d/1mWnTuAKw6ZAoT8YL6H8-v6Rh_nvQE2ZHwPCTo3t97pg/
- Use case 4-2: If we were to notify onpeerfound the the new foreground app. https://docs.google.com/a/mozilla.com/drawings/d/15F9vWzahp-RBXdn8qj5_6q7Ntn1qcJ57TPYZTxJ26mM/
- Use case 5: combined all the cases above. https://docs.google.com/a/mozilla.com/drawings/d/1U-pCqu-Dh_zySKNgN8cy15X5FSjv2n-O9dHi1ZyKKYw/
- Use case 1a: onpeerfound callback. https://docs.google.com/a/mozilla.com/drawings/d/13AZmUzItldz_of6P3b1Kc2AyAJwOzcDbpcrwravSMiI/
- Use case 2a: Dispatch NFCPeer to foreground app. https://docs.google.com/a/mozilla.com/drawings/d/1Jtlcxegam5Lls3S-4E0zrRXRKu2sG8clDfBL6uYVMTg/