I've made an app that intercepts SMS messages (using this method: https://www.b4x.com/android/forum/t...cepting-sms-messages-in-the-background.20103/). It then needs to map them to the contacts list, to get a person.
However, a problem occurred. The contacts list usually only has national numbers (for example, in Sweden, 0123-456789), while the number I get in the SMS message is the international number (in the preceding example, +46123456789).
Now, I can do some things easily to make the comparison easier, such as stripping the string down to only numbers, but that still doesn't fix the root problem here. Is there any API or library that can go from international numbers to international?
Sure, I could whip out some code to do it, but that would require me to do a lot of research on different national phone number schemes for all countries that might run my app. It would also require me to keep up to date if numbering schemes change. That's a lot of work, so I'd prefer not to.
Any hints?
However, a problem occurred. The contacts list usually only has national numbers (for example, in Sweden, 0123-456789), while the number I get in the SMS message is the international number (in the preceding example, +46123456789).
Now, I can do some things easily to make the comparison easier, such as stripping the string down to only numbers, but that still doesn't fix the root problem here. Is there any API or library that can go from international numbers to international?
Sure, I could whip out some code to do it, but that would require me to do a lot of research on different national phone number schemes for all countries that might run my app. It would also require me to keep up to date if numbering schemes change. That's a lot of work, so I'd prefer not to.
Any hints?