Hi,
Can anyone help me in understanding the “MIN_MATCH” usage in Phone
lookup table in Contacts Package/application in Android?
The “MIN_MATCH” value is defined as 7; so it means to sort or search a
number from the Telephony database file; only 7 digits will be taken
into consideration. Various countries in Europe and Asia Phone numbers
are more than 7 digit and for those this is not going to work as
expected. May be this will return the First inserted data in the
DB[having more than two contacts having same last 7 digits in
phonebook]; which can be wrong.

IF I change this number from default 7 to 8; then CTS test case fails
which expects this to be 7.
Also I tried to put my code in between MCC check; but in this case we
have two different kind of behaviors
1.       If any contacts are added or synced without SIM then MIN_MATCH
value is taken as 7 [because this is default]
2.      And If contacts are added  or synced with SIM then MIN_MATCH value
is taken as 8 [The changed one]
And the Phone lookup table is created which is mix of both 7 & 8
MIN_MATCH values and when we try to fetch the phone numbers; it
returns null. [As MIN_MATCH value doesn’t match]
Can anyone please help me in understanding the usage of MIN_MATCH
value and how can I take care of two kind of MIN_MATCH  value at
runtime?

I am also giving code snippet for more clarity
buildPhoneLookupAndContactQuery(phoneNumber)    =>+919886179073
{
          minMatch=toCallerIDMinMatch(phoneNumber)      =>3709716
                    {
                              np =
extractNetworkPortionAlt(phoneNumber);  =>9886179073
                              return internalGetStrippedReversed(np,
MIN_MATCH);     =>3709716
                    }
}
Log says =>     PHONE_LOOKUP:(3709716)
D/PhoneUtils( 1462): - onQueryComplete: CallerInfo:
D/PhoneUtils( 1462): name: null
D/PhoneUtils( 1462): phoneNumber: +919886179073


Thanks you all for your time!
Abhay

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to