Friday, February 13, 2015

HCE: The User Experience That Nobody Talks About

Host Card Emulation (HCE) is an incredibly enabling technology. For Android developers there are a few nuances to be aware of in the form of OS rules. Not understanding how these rules apply can have a negative impact and create an embarrassing or awkward customer experience if the system should render a 'payment failure'. Here are four scenarios to keep in mind to avoid point-of-sale issues.

Avoid The Embarrassment



The only limiting factor for the NFC radio in an Android device is whether or not the screen is lit up. What that means is that the NFC radio will turn on and could be ready for an HCE transaction is:

screen is dark:    NO
screen is lit:       YES

That rule alone is an Android rule, not an application rule, and so the application will have the ability to further limit this HCE experience if it wants to.

To support the best user experience, an application must be able to respond and complete an HCE transaction on demand if the screen is lit up. This should hold true even if:

1) application is running in the foreground
2) application is running in the background
3) application is NOT running at all because android has "repo'd" or removed it from running memory, or not started at all since a re-boot of the phone.
4) application is NOT running and a time based  Limited Use Key has expired since the application stopped running

The 1st and 2nd cases above are the easy ones as transaction data can be store in the running application memory space.

Here is how android works on the 3rd and 4th scenarios. When the phone antenna engages the terminal antenna and the terminal requests a particular AID, then the android OS looks at that AID request from the terminal and decides which Card Emulation Service to startup based on the "Tap and Pay" menu options.  That service is NOT your app, it is a component of your application that is expected to respond to APDU requests from the terminal. An APDU stands for Application Protocol Data Units.  The challenge is that the service will most likely not contain the APDU data to respond with as the rest of the application is not currently running at that time and the data required may not be loaded. It would require that the APDU data that the reader is asking for actually must be persistent in some way on the device so that the service could get access to it and answer the terminal properly with card data.

There are a few ways to store data locally, but the point is that it must happen in order to respond to the reader in time for a proper user experience. We have noted that simply expecting the application to be running on the phone at tap time is simply not reliable and that in a 24 hour window, it the app is not used, then Android has likely removed that application from memory.

This is just food for thought as you are thinking of designing your own HCE application or using a vendor like ST.  By the way, the SimplyTapp SDK supports all 4 scenarios listed above. The 4th is slightly more complicated, but i'll leave it up to you to noodle at.


28 comments:

  1. isn't your service going to receive the APDU payload as param? as, in order to be a HCE service, it must extend android.nfc.cardemulation.HostApduService

    https://developer.android.com/guide/topics/connectivity/nfc/hce.html#ServiceImplementation

    ReplyDelete
    Replies
    1. Great Article
      android based projects





      Java Training in Chennai

      Project Center in Chennai

      Java Training in Chennai

      projects for cse



      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. I will be reading about this article tomorrow in my classroom and then our teacher will review and explain to all of us about it. Thanks for this.

    ReplyDelete
  3. Superb, what a web site it is! This webpage gives valuable facts to us, keep it up.
    iPhone contact number

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. I'm shakshi.I am working in India top most Escort serviceEscort service in Mumbai.If u want to join the all facility of escortsEscort service in Bhubaneswar.pls call me & whatssapEscort service in Puri
    visit the sites.Escort service in Cuttack

    ReplyDelete
  6. What is it?
    Anthony Joshua defends his status as undisputed heavyweight champion of the world against Andy Ruiz Jr, his first fight since September 2018.

    When is it?
    The fight is on Saturday, June 1, but due to time differences UK viewers may be watching in the early hours of Sunday, June 2

    Where is it?
    Madison Square Garden, New York City. The Manhattan venue is steeped in boxing history having hosted fights involving Muhammad Ali, Joe Frazier and Mike Tyson.

    What TV channel will it be on?
    Sky Sports Box Office have exclusive pay-per-view coverage while viewers in America will be able to watch via streaming service DAZN.

    Joshua vs Ruiz
    Ruiz vs Joshua
    Joshua Ruiz
    Joshua vs Ruiz Live
    Joshua vs Ruiz Live Stream


    When is the Champions League final?
    The Champions League final will take place on Saturday, June 1.

    What time is kick-off?
    Tottenham vs Liverpool kicks off at 8pm, BST.

    What TV channel is it on?
    There is exclusive live coverage on BT Sport 2. Alternatively, you can bookmark this page and return on matchday to follow all the action on our dedicated live blog.

    There are several ways to access BT Sport. If you’re already a BT Broadband customer, you can add BT Sport for nothing for three months and then £10 a month thereafter. For new customers, broadband and television packages start at £34.99 per month.

    Champions League Final
    Champions League Final 2019
    Champions League Final Live
    UEFA Champions League Final

    ReplyDelete
  7. The 2019 Belmont Stakes odds behind favorite Tacitus, who is 9-5. With so little separating the top two choices on Saturday, and plenty of other intriguing value selections on the board, you need to see the predictions from horse racing handicapper Hank Goldberg before making any 2019 Belmont Stakes picks of your own.
    GGG vs Rools
    GGG Rools
    GGG vs Rools Live
    Golovkin vs Rools
    GGG vs Rools Fight

    This story was written in collaboration with Forbes Finds. Forbes Finds covers products we think you’ll love. Featured products are independently selected and linked to for your convenience. If you buy something using a link on this page, Forbes may receive a small share of that sale.
    Belmont Stakes 2019
    Belmont Stakes
    Belmont Stakes Live
    Belmont Stakes Race
    Belmont Stakes Horses

    ReplyDelete
  8. Hey, that's a very unique topic you covered. I wonder if the NFC tag also applies on Quickbooks applications from one phone to another transferring data over android ? that would be even great to know.
    In return you can check this informative blog on how to download and install Quickbooks Tool Hub in order to rectify all the errors that occur in Quickbooks app

    ReplyDelete
  9. This blog is very useful for me, helps me learn a lot. I appreciate your kindness in sharing this useful with you and me!
    Verizon's email service is widely regarded as one of the best in the world. It has a powerful feature set and a fantastic user interface, making it a top-notch emailing platform.
    If you can't remember your Verizon password and are having trouble logging in to your account, you can easily Change Verizon Email Password by visiting our website and following our guidelines.

    ReplyDelete
  10. Very Interesting and wonderfull game keep Download Ludo Online Game

    ReplyDelete
  11. In order to enhance the effectiveness of the accounting it is necessary for the company to take the outsourcing outsourced cfo services

    ReplyDelete
  12. Wow! What information is? I have no words to how to appreciate your knowledge. It’s such an outstanding post for all. Please keep sharing again with us this type of information.
    AOL is a popular email service provider all over the world. Users can easily set up their AOL Email account on your Windows 10 operating system. But Certainly, some users have complained about AOL Mail Not Working On Windows 10. If you are experiencing this issue in Windows 10, then you can contact our AOL Email Supports Technical Team via a toll-free number. They will provide you simple instructions to fix AOL Mail Not Working issues. For More Information, you may visit our website.

    ReplyDelete
  13. Quickbooks is especially ravishing in assignments like following accounts, arranging deals, and helping with solicitations. We can see the brilliance of this software in each component it has. Notwithstanding its flawlessness, QB clients like you and me need to confront a few errors on occasion. It is once in a while frustrating as you need to keep down your significant works. One such issue that frequents Quickbooks is the quickbooks won't open error. It is a error that limits the client from opening the QB work area programming.

    ReplyDelete
  14. Thank you for posting such a great article. Keep it up mate.

    nhts 2021

    ReplyDelete
  15. quickbooks error 15106 is the most normal error, which is happening when refreshing finance. QuickBooks gives phenomenal alternatives to conquer the blunder and to put it plainly, dispose of it.

    ReplyDelete
  16. You got a really useful blog. I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me. For instant support related to Common AOL Mail Login Issues please contact our technical expert for help

    ReplyDelete

  17. Thanks for sharing this post .this is the best technical provider ,providing online technical support service including the phone calls and all other services if you are search these kinds of technical sites and all helpful services go through in
    error 1723 quickbook and click on the mentioned link

    ReplyDelete
  18. Many aspirants face different type of issues with errors and if anyone is facing error regarding quickbooks unexpected error 5 so here is your solution for that you can go through this above mentioned page and gather the solutionsquickbooks unexpected error 5: A QBs Repairing Guide

    ReplyDelete

  19. Thanks for sharing this post .this is the best technical provider ,providing online technical support service including the phone calls and all other services if you are search these kinds of technical sites and all helpful services go through inerror 1723 quickbook

    ReplyDelete
  20. Thanks for sharing your post it helps me alot for my articles it helps me for better graphics and design for the most important data and more creative ideas you can just check on error 1723 quickbook for this site

    ReplyDelete

  21. Hey, I am an IT student and thanks for updating us with this information this is really nice blog and very informative if you want more information about the article click on

    error 1723 quickbook to visit the site

    ReplyDelete
  22. thank you for sharing your information. I really appreciate your efforts and Thanks a lot for sharing a piece of wonderful information which I am looking for for a longer period of time.it is very helpful for the students because of the nice creativity and animations if you want more click on quickbooks error #15215

    ReplyDelete
  23. Nicely written.
    QuickBooks and Quicken are the world’s most useable accounting software. if you own a little to medium enterprise then the quickbooks was best for you but if individuals and families then the quicken was best for you. here you can compare them quickbooks vs quicken

    ReplyDelete
  24. why won't QuickBooks open might try to open your previous company. Press and hold the Ctrl key, then double-click the QuickBooks Desktop icon. Important: Don't release the Ctrl key until you see the "No Company Open" window unless QuickBooks freezes or gives you an error.

    ReplyDelete