Android Intent serialization and deserialization, androidintent

Source: Internet
Author: User

Android Intent serialization and deserialization, androidintent

// Serialize intent. toURI (); // use Intent. parseUri (uriString, 0) for deserialization );


Serialization

Intent intent = new Intent (ACTION); intent. addFlags (Intent. FLAG_ACTIVITY_NEW_TASK); String intnetUri = intent. toURI (0 );

Deserialization

Intent I; try {I = Intent. parseUri (uriString, 0); context. startActivity (I);} catch (URISyntaxException e) {e. printStackTrace ();}

UriString is the serialized Intent.
C # serialization and deserialization: urgent and urgent Use Cases

Serialization and deserialization are used to save data in the memory. They are not a unique technology in C #. For example, the sleep of win7 is the application of this technology,

The C # program can be used to save the object and the current state of the object. It will be obtained through deserialization next time it is opened,

It is generally used for server startup (deserialization) and Shutdown (serialization) to save data.

Serialization and deserialization are used separately

It is mainly used to store objects in another common format, such as binary, xml, and json. Converting objects into this format is called serialization, deserialization is usually returned from this format.

Serialization is mainly required for cross-platform and Object Storage, because only strings or binary formats are allowed on the network, and files must use binary stream formats, to store an object in memory, you must use serialization to convert the object to xml (string), json (string), or binary (Stream)

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.