In my BB app, i want to detect phone numbers as well as to call those phone numbers. In order to do that i have used ActiveRichTextField instead of LabelField. This field works fine to detect the phone numbers but the problem i am getting is that it fails to detect some of the numbers especially of the country Australia. It detects phone numbers of India perfectly fine but not for Australia and some other numbers. What i have done for this is posted below as:
ActiveRichTextField descField;
if (isFocaseble) {
descField = new ActiveRichTextField(replacedString.trim(),
ActiveRichTextField.FIELD_LEFT |
ActiveRichTextField.USE_ALL_WIDTH |
ActiveRichTextField.FOCUSABLE)
i have checked here if its focused or not because only numbers have to be gained focused since there are other data also which have no need to be given focus and replacedString is what the data getting from the webservice.Below are the snaps of my screen through which one can get the clear idea of my problem.
(1) Below are Numbers of Australia:
(2) Numbers of Australia
(3) Numbers of India
Can anybody have any idea regarding this? why i am not able to detect whole numbers and where am i lacking?
Any sort of help would be appreciable.
Related
this is potentially really simple but I have been looking at it for ages, which may be the problem.
I am looking at log in times on a phone system v the times when calls are incoming. The spreadsheet breaks down the phone hours by minute and then checks the times someone logged in and displays if they were logged in at any given minute.
Then the data from incoming calls is pasted in which is converted into timestamps and compared.
The problem is a bit odd because it correctly counts from 9:30 to around 15:00 but then does not count entries after that time.
Here is a link to the spreadsheet copy I have made.
Any help would be appreciated. As I said it's probably really simple but often when you have looked at something too long you miss obvious things.
The problem is due to rounding errors
For example, both cell H72 and MK11 have the display value 15:05:00.
However, if you visualize the real value of the cells, e.g. by Paste values only into a cell formatted as a number you will see:
The exact value of cell H72 is 0.628472222222222
The exact value of cell MK11 is 0.628472222222221
This rounding error was not obvious for the first rows / columns but it kept propagating through the data until the point of becoming big enough to change 15th decimal position.
The reason is that Google Sheets stores numbers as 64 bit signed floating points which limits the precision to the 15th decimal position and thus rounding errors will not become obvious as long as they are smaller than this.
Solution
Given that you use the formula
=ROUNDUP(F12*1440/1,0)*1/1440
on column H for the call list, you should do the same for the incoming rows in row 9, so
=ROUNDUP(1440*(N11+time(0,1,0)))/1440
and so on.
I'm trying to retrieve contacts phone numbers to be able to send SMS on behalf of a user. When the number includes the country code (ie starts with +, or 00) I'm fine. However when this is not the case, I'm trying to guess what the country code should be.
// contact is a CNContact with at least one phone number
contact.phoneNumbers[0].value.value(forKey: "countryCode") as? String
returns a country code like us or fr (even if it's not recommended to do so) but I've found it to sometime be inaccurate. My guess is that Apple uses the user's local. It even misclassify numbers with explicit country code. For instance a number 00 54 ... is classified as us while it's from Argentina.
I can also use the user's current local (NSLocale.currentLocale().objectForKey(NSLocaleCountryCode) as? String) and use that to fill missing country codes. But it will obviously misclassify some numbers.
Is there's a better less error prone way?
I wonder why 2 digit phone number won't open phone app after tapping "call"
555 // shows alert, tap on call opens phone app
55 // shows alert, tap on call won't open app
If this isn't possible using the tel scheme, then Apple's implementation doesn't conform to RFC2806 (which they reference in their documentation for Phone Links), which states:
It should also be noted that implementations MUST NOT assume that telephone numbers have a maximum, minimum or fixed length, or that they would always begin with a certain number. Implementors are encouraged to familiarize themselves with the international standards.
I'd file a bug.
I don't think 2 digit phone numbers are functional numbers. Apple does not allow you to call numbers shorter than 3 digits.
According to spec, a valid telephone number should consist of the first digit of the area code being between 2 and 9, followed by at least 2 digits. Therefore, the smallest valid telephone number is at least 3 digits long.
If your attempting to do something like dial a number, and then dial an extension you can define a pause with p like this:
tel:234p55
w can also be used to specify a wait-for-dialtone.
I do not know if this will work or not but you may be able to dial a 2 digit number using phone-context
55
I have a table with columns as LowerFrequency, HigherFrequency and ID. The frequencies entered have a suffix of khz or mhz. I want to search a specific frequency by checking the range it falls in i.e between the lower and higher frequencies and fetch the respective ID.
The query I implemented was as below but it returns a wrong output:
select tablename.ID where "100 khz" between tablename.LowerFrequency and tablename.HigherFrequency;
I know the reason is because of the khz that follows the integer. But I need some suggestions to handle this as I am not in a situation of changing the whole DB file because it is time consuming.
I will be integrating this DB with my iPhone app. So any solutions in Objective C would also be appreciated. I mean some kind of conversion.
Is there a service that provides latitude and longitude for UK phone numbers?
For example:
Query: 0141 574 xxx, Returns: (55.8659829, -4.2602205) [Glasgow City Centre]
Allow me to stress that I am not looking for a reverse-directory-enquires. I am more interested in 'local area' for things like weather by phone or "Where's my nearest Pizza Shop?"
If this service doesn't exist your suggestions on how to implement it or where to get data from would also be incredibly useful.
I am aware that Ofcom provides a list of area codes with a place name [1] suitable for geolocation, but I have my concerns about resolution. I see this as a particular problem in smaller towns and rural areas where an area code will cover a large geographical area.
Second Example:
Area Code: 01555, Ofcom: Lanark
However:
01555 860xxx is Crossford (4 miles W of Lanark)
01555 77xxxx is Carluke (5 miles NW)
01555 89xxxx is Lesmahagow (5 miles SW)
01555 840xxx is Carnwath (7 miles NE)
Therefore 01555 covers about ~80 sq miles. That's not particularly local.
[1] Ofcom Area Code Tool: http://www.ofcom.org.uk/consumer/2009/09/telephone-area-codes-tool/
You can get a resonable location for numbers allocated to BT.
The "L" digits map to a particular exchange within that area:
(02X) LLLL XXXX (2+8)
(011X) LLL XXXX (3+7)
(01X1) LLL XXXX (3+7)
(01XXX) LLXXXX (4+6)
(01XXX) LLXXX (4+5)
(01XXXX) LXXXX (5+5)
(01XXXX) LXXX (5+4)
For cable providers (especially those using fibre optic delivery), there is sometimes only one exchange per area code and therefore the numbers in each LL range cover the entire area code.
For numbers allocoted to other providers there's a similar problem. Additionally, those numbers may be allocated as VoIP and in use in another area or even in a completely different country. For non-BT numbers location data cannot be relied on.
For people who have moved and kept their number, location data will also be inaccurate.
That said, CodeLook does a reasonable job of showing the right data: http://www.telecom-tariffs.co.uk/codelook.htm
You may have a problem in that not all numerics after area codes are geographic. Some have been block allocated to Cable Providers. I know my own number has belonged to myself and also a person who lived about 5 miles northeast of my current location, the link... we belong to the same cable provider.
What sort of telephone numbers are they? If they are businesses, what do you think of the possibility of searching for the whole number using say, Googles API, and lifting the actual address from the page? - I know thats harder to do than that, just exploring some possibilities ..;-