Read the original article:Some issues about migrating hce app from GT5 to wearable devices
Question
What are the common problems people face while migrating hce app from lite wearable to wearable?
Short Answer
Problem: Function cardEmulation.isDefaultService(XXX,XXX) is supposed to return true or false, but it turns out to undefined
Solution: Refer to img as follows, you should use parameter like elementName, the abilityName supposed to be the full name with prefix of module name
Problem: Function hceService.on('hceCmd', (apduData)=>{}), there is no execution for callback funcion
Solution:You should add error parameter for callback function, like this:hceService.on('hceCmd', (error, apduData)=>{}),
Problem: hec service transmit function format error,callback parameter return undefined,like following image:
Solution:hec service transmit function format error,you need to refer like following format:
Problem: Critical configuration on config.json
Solution:As following image:
1)bundle name, it's critical for judge default payment app in Q1
2)module name, ability name, it's critical for judge default payment app in Q1
3)declare HCE actions
4)declare HCE payment id, it's critical for HCE payment on background
5)request permissions for HCE




Top comments (0)