Какова лучшая практика в разработке ежевики для достижения самого широкого диапазона смартфонов?

Я не знаю о стандартной библиотеке или платформе, доступной для форматирования номеров телефона в E.164.

решение использовало для нашего продукта, который требует, чтобы PBX форматирования, обеспеченный идентификатор вызывающего абонента в E.164, развернул файл (таблица базы данных), содержащая данные о формате E.164 для всех применимых стран. Это имеет преимущество, что приложение может быть обновлено (для обработки всех странных угловых случаев в различных телефонных сетях) w/out требующие изменения в производственной кодовой базе.

таблица содержит строку для каждого кода страны и информации относительно длины кода зоны и длины подписчика. Могут быть многократные въезды для страны в зависимости от того, какие изменения возможны с длинами кода зоны и номера абонента.

Используя Новозеландский PSTN (частичный) план набора как пример таблицы..

CC  AREA_CODE  AREA_CODE_LENGTH  SUBSCRIBER  SUBSCRIBER_LENGTH
64                            1              7
64         21                 2              7
64        275                 3              6

Мы делаем что-то подобное тому, что Вы описали, т.е. разделяете обеспеченный номер телефона любых символов нецифры и затем форматируете на основе различных правил относительно длины плана общего количества вне кода доступа и большого расстояния / международные коды доступа.

15
задан Cœur 16 April 2017 в 07:23
поделиться

1 ответ

Tips for wide range devices

The question is: how to write code that will handle different RIM OS, carriers and device models? In code that will depends on available/deprecated API, in workflow about handling carriers features and characteristics of device.

First of all, read How To - Develop applications for different BlackBerry Device Software versions and BlackBerry smartphone models

Wide range RIM OS support

StackOverflow - Which BlackBerry OS version to target for? - to be short, my choice is RIM OS 4.5

Tips for 4.7 - 4.6 - 4.5 - ? support:

  • navigation, use accelerometer and touchscreen, but don't forget about trackball and menu
  • borders, there are no BorderFactory in 4.5 and earlier
  • background, there are no Background in 4.5 and earlier
  • transparency, there is no Graphics.setGlobalAlpha(alpha) in 4.5 and earlier
  • multimedia, different formats are supported on differen OS and phones

See also
Blackberry - How to add border to BasicEditField?
Setting background and font colors for RichTextField, TextField
Skinning Blackberry Application
What Is - Supported audio formats
Support - Playing audio pauses Media app on BlackBerry CDMA smartphones
How To - Record Audio on a BlackBerry smartphone

Carrier support

I have no statistical information about BlackBerry carriers. But lets see what are those carrier features we can meet:

  • if we use carrier network resources, carrier controlls all network configuration. That means on ex. we may have no UDP, max. transfer file size about 3 Mb, and we will have to config APN settings
  • also, carrier and device combination defines what GPS type is accessible. And for Verizone, there is a special signing process to access GPS.

See also
What Is - Restricted ports
What Is - Network Diagnostic Tool
How To - Determine when to route data
What Is - Different ways to make an HTTP or socket connection
How To - Specify APN information for a direct TCP connection
What Is - Best practices for designing GPS applications for BlackBerry CDMA smartphones
What Is - The BlackBerry smartphone models and their corresponding GPS capabilities
What Is - Verizon GPSSettings signing requirement

Different devices

Things which may help support set of devices:

  • use flexible, elastic UI elements, change size and layout according to screen size
  • use several graphic resources sets of different size
  • control font type and size
  • before use camera, check if it's available

See also
What Is - Compatibility mode on touch screen BlackBerry smartphones
What Is - Image formats used in BlackBerry applications

Building several RIM OS

There are preprocessor directives, but I prefer to use BB Ant tools, copy/delete all platform version diff (code, resources) and target appropriate rapc directory from build task.

See also
How To - Use the preprocessor

20
ответ дан 1 December 2019 в 03:43
поделиться
Другие вопросы по тегам:

Похожие вопросы: