Skip to content

Util app which will help generating contacts for Address Book in order to get valid international numbers from different countries among contacts

License

Notifications You must be signed in to change notification settings

sergii-frost/contacts-generator-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App logo

contacts-generator-android

Util app which will help generating contacts for Address Book in order to get valid international numbers from different countries among contacts.

App:

  • allows to generate 0..100 contacts for selected region (you can generate more, they will have similar names though)
  • all generated contacts are added under separate group/label named "ContactsGenerator"
  • existing contacts from address book are shown in the list without red icon to the right in the contacts list per country
  • deleting all contacts will delete only contacts generated by app, leaving existing contacts untouched

--> -->

Core package

If you want to use non-UI code in your project, feel free to grab only core package contents.
It contains:

  • ContactModel which is simplified model for contacts from Address Book
  • RegionDataModel which represents list of contacts per country/region
  • PhoneNumberFaker which uses .json files as input for possible phone numbers
  • ContactsHelper which is responsible for managing contacts in Address Book.

You will also need to add .json files for each region you want to support.
By default .json files should be placed in assets/regions path.
File name should be named after valid region (2 letters country code, e.g. se for Sweden)

Format of the file can be like:

{
  "phones": [
    "+46 70 #######",
    "+46 72 #######",
    "+46 73 #######",
    "+46 76 #######"
  ]
}

As a result, PhoneNumberFaker will generate fake possible numbers by replacing # with random digit from 0..9 Phone number validation is done based on PhoneNumberUtil which is part of Android SDK.

About

Util app which will help generating contacts for Address Book in order to get valid international numbers from different countries among contacts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages