How simplemobiletools/simple-contacts works
Purpose and Runtime
Simple Contacts is a native Android/Kotlin contact-management app. It manages device or synchronized contacts, groups, favorites, contact fields, calls/messages, duplicate merging, and vCard import/export without a backend service. The Gradle Android app module is app/build.gradle.kts; application metadata and Android component registration begin at app/src/main/AndroidManifest.xml.
Startup and Navigation
App.kt initializes application-level behavior. Android launches through the manifest into the activity flow, with SplashActivity.kt acting as startup routing and MainActivity.kt as the primary host UI. MainActivity presents the main contact experience, while SettingsActivity.kt owns user-configurable behavior and appearance.
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/App.kt
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SplashActivity.kt
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt
Contact UI and Interaction Stages
The main UI is tab/fragment-oriented: contacts, favorites, and groups are separate screens coordinated through a pager. Recycler adapters render/filter selectable contact and group lists. Selecting a contact routes into view, edit, or action behavior according to preferences.
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/ContactsFragment.kt
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/FavoritesFragment.kt
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/GroupsFragment.kt
Contact and Group Mutation Boundaries
Dedicated activities handle viewing, creating/editing, and group membership workflows. These are the principal UI boundary around Android’s contacts data and contact actions such as calling or texting. Dialogs provide constrained operations such as selecting contacts/groups, source filtering, sorting, and visible-field management.
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/EditContactActivity.kt
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/GroupContactsActivity.kt
Data Sharing and External Integration
The app integrates with Android’s contact ecosystem and exposes its own content-provider boundary through MyContactsContentProvider. Android intents provide phone/SMS and file-selection interactions; no remote API or server-side runtime is represented. Provider file exposure is constrained by Android XML paths.
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/contentproviders/MyContactsContentProvider.kt
• app/src/main/res/xml/provider_paths.xml
• app/src/main/AndroidManifest.xml
Import, Export, and Backup Flow
vCard import/export is a discrete persistence interchange flow: UI dialogs choose the operation and file, VcfImporter/VcfExporter translate contact records, and Android storage/content URIs form the external boundary. Automated backup is scheduled/triggered by broadcast receivers, including device boot recovery.
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfImporter.kt
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfExporter.kt
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/receivers/AutomaticBackupReceiver.kt
Configuration and Distribution
Config.kt centralizes persisted app behavior such as sorting, visible tabs/fields, display options, and click behavior, consumed across activities/fragments. Product variants include F-Droid and prepaid resources. Gradle is the build runtime; Fastlane holds store metadata/release automation.
• app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt
• app/src/fdroid/res/values/bools.xml
• app/src/prepaid/res/values/bools.xml
Main entry points: AndroidManifest.xml Android manifest · MainActivity.kt Main contact host · build.gradle.kts Android app module · ContactsFragment.kt Contacts tab
Components 22
Android runtime
- Android manifest · Registers app components and provider exposure.
app/src/main/AndroidManifest.xml - Application setup
app/src/main/kotlin/com/simplemobiletools/contacts/pro/App.kt - Startup router
app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SplashActivity.kt
Contact UI
- Main contact host
app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt - Contacts tab
app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/ContactsFragment.kt - Favorites tab
app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/FavoritesFragment.kt - Groups tab
app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/GroupsFragment.kt - Contact details
app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt - Contact editor
app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/EditContactActivity.kt - Group membership
app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/GroupContactsActivity.kt - User preferences · Controls sorting, tabs, fields, display, and click behavior.
app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt
Data & integration
- App contacts provider · Exposes the app's contact-sharing boundary.
app/src/main/kotlin/com/simplemobiletools/contacts/pro/contentproviders/MyContactsContentProvider.kt - Android contacts ecosystem
- Phone, SMS & file intents
- vCard importer
app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfImporter.kt - vCard exporter
app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfExporter.kt - Storage content URIs
- Automatic backup · Runs scheduled backups and recovers scheduling after boot.
app/src/main/kotlin/com/simplemobiletools/contacts/pro/receivers/AutomaticBackupReceiver.kt - Provider file paths
app/src/main/res/xml/provider_paths.xml
Build variants
- Android app module
app/build.gradle.kts - F-Droid resources
app/src/fdroid/res/values/bools.xml - Prepaid resources
app/src/prepaid/res/values/bools.xml
Connections 25
- Android app module → Android manifest: builds
- Android app module → F-Droid resources: selects
- Android app module → Prepaid resources: selects
- Android manifest → Application setup: initializes
- Android manifest → Startup router: launches
- Android manifest → App contacts provider: registers
- Android manifest → Automatic backup: registers
- Startup router → Main contact host: routes to
- Main contact host → Contacts tab: hosts
- Main contact host → Favorites tab: hosts
- Main contact host → Groups tab: hosts
- Main contact host → User preferences: reads
- Contacts tab → Contact details: opens
- Contacts tab → Contact editor: creates or edits
- Groups tab → Group membership: manages
- Contact details → Phone, SMS & file intents: calls or texts
- Contact editor → Android contacts ecosystem: updates contacts
- Group membership → Android contacts ecosystem: updates membership
- App contacts provider → Android contacts ecosystem: shares contacts
- Provider file paths → App contacts provider: constrains file access
- Phone, SMS & file intents → vCard importer: selects import file
- vCard importer → Android contacts ecosystem: creates records
- vCard exporter → Storage content URIs: writes vCard
- Android contacts ecosystem → vCard exporter: exports records
- Automatic backup → vCard exporter: triggers backup