Android in-app multi-process implementation

Source: Internet
Author: User

Android platform supports multi-process communication and enables multi-process in-app
What do so many processes have to offer us?
We all know that theAndroid platform has memory limitations on the application , in fact, this understanding is a bit of a problem, it should be said that the Android platform for each process has a memory limit, such as a model on the process limit is 24m, if the application has two processes, then the total memory limit should be 24m. using multiple processes will allow us to use more than a few times the memory limit of an apk.
So you can take this picture platform on the application of memory limitations, such as some to the image, video, large file process processing of good memory applications can consider the multi-process to solve the problem of the application operation is not smooth.

The implementation of multi-process can be achieved by setting the service, broadcast, activity label Android:process.
Typically starting these components is run in the same process by default, and if the android:process tag is set, it will run in other processes.
If the value of android:process is not the beginning of ":", then the process with the same name in the system will be placed in the existing process of the same name, which can reduce consumption.
If the value of android:process begins with ":", a process with the name value is started.

After implementing the multi-process, it is interprocess communication.
There are two ways to implement interprocess communication:
1, using the system framework to achieve
2, the realization of their own aidl

System framework for process communication useful too service,broadcast,activity,contentprovider

Transferred from: http://www.eoeandroid.com/thread-320076-1-1.html

In Android, the default APK package corresponds to a process whose process name is the one specified in the Androidmanifest.xml file. We can implement the single APK multi-process through activity, Service, Broadcastreceiver, ContentProvider's Android:process property, but we need to pay attention to the non-visibility of inter-process memory.

For example, see: http://blog.csdn.net/hudashi/article/details/7858125

Android in-app multi-process implementation

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.