Android Play series: Modify the assembly code to support native HD call dashboard (1)

Source: Internet
Author: User

This article is divided into three parts. This article focuses on the problem of "Full Screen incoming call dashboard". If you want to directly access technical details, go directly to article 2:

Http://blog.csdn.net/aimingoo/article/details/7939116

]

1. Phone call stickers on Android phones

========
In fact, the incoming call daemon includes two statuses, which are generally called "Incoming call daemon ". This feature has three implementation methods:
-A: When a third-party software is used for power-off, a large head sticker is displayed on the native dial-up panel;
-B: In the ROM provided by a few developers, the dial-up panel software with the dashboard function is integrated;
-C: In the existing Rom dial-up panel, native supports the dashboard function.

First, let's talk about why toutiao.com is so difficult to support. This is because in the android native system, the Contact Profile Size is 96X96, which is mandatory to be square. This standard is partly because Android mobile phone contacts and Google Contacts support synchronization, and Google online contacts are the standard.

In some cases, high-definition contacts can be stored in the contacts on the mobile phone. However, once the account is synchronized with the Google account, the profile picture quality of the contacts will immediately decrease. This problem is caused by the overall mechanism of Google. We will not talk about it here. Therefore, we must also emphasize that the "high-definition incoming call dashboard" discussed in this article may be affected by Google account synchronization on Android phones. We recommend that you disable the synchronization function.

Because of this standard, the "contacts" function in the Android mobile phone sets the Avatar, and the cut boxes opened are square and saved to the contact database, images will also automatically reduce the quality. Obviously, due to these factors, to achieve "Full Screen incoming call dashboard", you must bypass native contacts and dial-up panel tools.

In Android, the contact person is contacts.apk, and the phone number is phone.apk. The two are generally independent of each other and can be replaced. However, because they all use special signatures and directly rely on the framework in the Rom, it is difficult to achieve common use between different Rom.

2. Different implementation methods
========
The three solutions mentioned above are further explained here.

First, solution a is the most common. In the Google market, we can find a lot of data. For example:
-Full Screen caller ID: full screen caller ID
-HD caller ID pro HD call
-Big! Caller ID
-Video caller ID: Video caller ID
-Ultimate_call_screen_hd
And so on. As mentioned above, this type of software comes with a contact management function, which is used to set "Who needs to display a large post ". In general, considering the consistent experience, the default dashboard is displayed for people who have not set a dashboard.

Because solution a is essentially implemented by covering the native dial-up panel, it actually has two problems. First, it is always a little later than the native dial-up panel, and the operation process is not smooth; second, because it covers the original dial-up panel, therefore, it must implement another "Answer" interface. The latter actually gave birth to another market: various major software vendors provide their own theme answering interfaces, and the electronic market was so popular.

Finally, in general, the call function of the software is not complete with the native dial-up panel, so it usually provides a "one-click switch to native panel" function. All in all, solution a is basically a layer of skin on the original dial-up panel. It will not be so "nice-looking" when it is uncovered or unmasked ".

But what about B's plan? The development of phone.apk can only be achieved by romproducers. I have noticed the following:
-Lewa ossag integrates the contact text message and communication management functions into a pim.apk solution, and implements the toutiao.com function based on this;
-The miui mobile phone integrates the dashboard management in the contact management and displays the dashboard.

In general, it is quite risky to start the script on the dial-up panel. If you want to do this, you have to provide a complete set of call functions. Based on the above observations, solution B is generally implemented as a compromise:
-B1: integrates a contact function in contacts.apk to help you set (or do not set) your contact;
-B2: When phone.apk detects incoming calls, if you set a large post in the B1 function, the large post will be displayed in the background of the call interface.
Obviously, this involves the changes to two important functions of the Android mobile phone, which is also the reason why "only a few Rom manufacturers" are doing this.

So what is the problem with B's solution? There are also two points. First, the management function of the dashboard is usually implemented independently outside the contacts of the system, that is, the profile picture of the contact is one, placed in the internal database of the Android system, and the dashboard is another, put it in a separate image folder. Second, the paste function in these Rom cannot be used universally and relies on the framework that has been greatly changed in the corresponding Rom.

Solution 3: the "full screen, high-definition dashboard" is implemented based on the native dial-up panel (and contacts) function, which we will discuss next. Its main purpose is to make Rom enthusiasts quickly integrate some dial-up panels with the "big-head sticker function" into their favorite rom at a very low cost.

3. Basics
========
First of all, we need to know that the "System's built-in Contact Database" can actually store high-definition portraits. Only when the contacts and Google Contacts are synchronized will these portraits be automatically reduced. This is one. Second, the internal data storage interface does not require the contact person's portrait to be positive, but only the contact person's software (contacts.apk) to achieve the contact editing function. When specifying the Avatar, it is required that the selection box be square!

Okay. With these two prerequisites, let's look for software that can "add HD profile pictures to contacts. There are actually two such good products in the electronic market, and their names are quite similar:
-HD contacts
-HD contact photos (or contact_photos_updater)
The latter has two names: contact_photos_updater, which is used in the xda Forum. The author also publishes and updates the software in xda.

These two software still have some problems. However, the latter (HD contact photos) can basically meet the requirements for the current task. It provides an independent Avatar management function. Although these portraits are stored in the disk directory, as long as you "Synchronize" them, they are all stored in the system library, it does not matter if the original directory is deleted. -- Of course, it is recommended that you stay and make a backup.

With the software "HD contact photos", "Write a large post to the system library" is solved (for the moment). We will discuss the problem of "how to display a large post in the call panel" later. Before that, I would like to make some remarks on the two "write a big post" software:
-Both software features and interfaces are similar, but the latter (HD contact photos) is much more complete.
-The former (HD contacts) cannot be used in ICS, and it has a bug: the contact must first set an Avatar before it can be changed to a big profile.
-Both software can only set the profile picture to a square. The former (HD contacts) is difficult to correct, and the latter is easier.
-The latter (HD contact photos) actually limits the image size, but it is easier to modify it.

So in fact, this article will also provide a modified version of the latter (HD contact photos), otherwise it will still not reach our goal.

Add two changes to the Attachment:

[Updated VV-ice custom version]

[Lezo custom version]

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.