Systemui the NFC button in the drop-down menu the probability of disappearing

Source: Internet
Author: User


[Result Behavior]

There is a certain probability that the pull-down NFC icon disappears after rebooting



[Expected Behavior]

cause

The Systemui is initialized earlier than Nfcservice, and Systemui executes only once, Mnfcadapter = Nfcadapter.getdefaultadapter (Mcontext), executes prematurely and executes only once, If the initialization is performed in the download structure, it will remain empty.

So it will cause a certain probability to restart when nfctile is getting nfcacapter=null

However, the Nfcacapter does not display the NFC icon when empty, and if it does, it will cause a bug that cannot be clicked.

Ideas

Initialization cannot be performed with Systemui.

Modify Method

After the Nfcadapter initialization is performed on the next action, the specific in setlistening () gets


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.