Android Contacts/acore process is often killed, resulting in the loss of contacts after booting what to do?

Source: Internet
Author: User

The Contacts/acore process, which is often activitymanager killed in the case of low memory and too many boot processes.
Causes the SIM card contact after boot not import or just import part, causes the contact loss phenomenon, but once again the boot can return to normal.


Encountering this problem can be used to provide the Contacts/acore process priority, reduce the probability of being killed by Activitymanager.

Method 1:
Increase process Priority
Startforeground (1, New Notification ());
Reduce process Priority
Stopforeground (TRUE);
NOTICE:
This method can temporarily increase the adj of the corresponding AP to 2.

Method 2:
Locate the corresponding Androidmannifest.xml file for this process, adding the attribute "android:persistent=" to "true",
This allows the process to be set to a resident memory process, which reduces the probability of being killed.
Take the Acore process as an example.
Add a line "android:persistent=" to "true" in the/package/providers/contactsprovider/androidmannifest.xml file
Detailed changes to the scale are as follows:
<application android:process= "Android.process.acore"
Android:label= "@string/app_label"
android:icon= "@drawable/app_icon"
Android:allowbackup= "false"
Android:persistent= "true" <!--new Add code. Ensure that the acore process is not killed by Activitymanager-
>
NOTICE:
This method can temporarily increase the adj of the corresponding AP to 2.

Resolve JE problem (must be included):
Calllogprovider.java (Line1000)
public static final void Notifynewcallscount (Sqlitedatabase db, Context context) {
... ...
LOG.I (TAG, "[notifynewcallscount] Newcallscount =" + Newcallscount);
Send count=0 to clear the unread icon
if (newcallscount >= 0) {
Intent newintent = new Intent (intent.mtk_action_unread_changed);
Newintent.putextra (Intent.mtk_extra_unread_number, Newcallscount);
Newintent.putextra (Intent.mtk_extra_unread_component, New ComponentName (Constants.contacts_package,
constants.contacts_dialtacts_activity));
New Add for fixed JE
Newintent.addflags (Intent.flag_receiver_registered_only_before_boot);
End
Context.sendbroadcast (newintent);
... ...

Android Contacts/acore process is often killed, resulting in the loss of contacts after booting what to do?

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.