[Android] Android communication protocol

Source: Internet
Author: User

1. Data Differentiation

Phone-side: constant storage

Server-side: database-built table storage

2. Data sources

Android,iOS,pc,WAP

3. Data acquisition and mining

IMEI: Device number

IMSI:SIM card number

4. Data encryption

4.1RSA Algorithm

4.2 Simple Code handling: Timestamp (simpledateformat)+ random value

4.3 data summary:MD5(Know The original data before MD5),MD5 (If the original encrypted data is the same, the result of the encryption is the same, so the timestamp is used to ensure that each request token is different)

Unique identification of the request

5. Verifying data

The server receives the data transmitted by the mobile phone and needs to verify the data

5.1 processing of plaintext data parsing

5.2 is mainly the composition of token,token : timestamp + agreed random value

Phone-side send: timestamp, assembled token

Server receive: Timestamp, receive token

Server- side tokens and token comparisons received based on timestamp + agreed random values

6. Generalization of the agreement

6.1 The development of new protocols and the encapsulation of existing agreements

format of the 6.2 protocol:XML and JSON

compression of the 6.3 protocol:wbxml and compression of large amounts of data

New agreement:

1. Implementation of basic functions

2. Data acquisition

3. Extensibility

4. Information integrity check

5. Easy to Program

Wbxml:

Compressing XML , maintaining a corresponding relationship such as:

<message>======>m

Can save a lot of data space

Processing of large packets:

All the data to be transferred can be stitched together to save unnecessary data and to be removed according to certain rules.

[Android] Android communication protocol

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.