This series of tutorials is dedicated to the quick learning of Android development, in accordance with the project approach, usually an article will do a small program. Improve your interest in learning.
On the one hand to summarize their own income, on the other hand can help more study colleagues through their own sharing.
Because of the coherence of knowledge, it is recommended to study in a twinkling. Directory Links: http://www.chengxiaoxiao.com/bozhu/1336.html
This tutorial by today's headlines-do the full-stack Siege Lion original debut, reproduced please indicate the source.
University students seeking part-time: please contact Wx:aiquanzhan
The GitHub source code is available at the end of the page.
I. Description of the project
Through the small program to achieve accurate interpretation of identity card information, display identity card attribution information. Through the ID card number, you can check the corresponding attribution address and birth information.
We use third-party API URLs to obtain ID information, which is returned as JSON-formatted data. API Address: http://apistore.baidu.com/apiworks/servicedetail/113.html
Second, the required technology
Network requests
JSON parsing
Third, actual combat projects:
3.1 Front-desk interface: It's easy to put a code on it. Obtain ID information by entering the ID number.
3.2 Background Control initialization:
3.3 Network Requests
1. Use the Network debugging tool to find that the JSON returns the following structure:
2. Using object-oriented thinking, we create the corresponding object:
3. Send network request, parse JSON
To make a network request, you must not forget the permissions: increase access to the network in Androidmainfest:
Background processing:
GitHub Source Address: Https://github.com/Shellcheng/jsonParse
Original: Do the full stack siege Lion-Wx:aiquanzhan
Android starter Project-ID card information Viewer, accurate interpretation of identity card information