Skip to content

feat: Enable contact import via Android Share Sheet#383

Closed
vijay2909 wants to merge 1 commit intoFossifyOrg:mainfrom
vijay2909:feature/contact-share-import
Closed

feat: Enable contact import via Android Share Sheet#383
vijay2909 wants to merge 1 commit intoFossifyOrg:mainfrom
vijay2909:feature/contact-share-import

Conversation

@vijay2909
Copy link

@vijay2909 vijay2909 commented Oct 7, 2025

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

  • AndroidManifest.xml: Registered the app as a share target for contacts via an . to make the app appear in the Android Share Sheet.
  • Add grantUriPermissions to securely accept temporary read permission from other apps. Otherwise app'll get SecurityException
  • Intent Handling: Added logic to parse ACTION_VIEW, SEND, and SEND_MULTIPLE intents to handle single, multiple, and direct file opening scenarios.
  • File Handling: Processed shared contact URIs on a background thread to prevent UI freezes to keep the UI responsive and prevent the app from freezing.

Tests performed

  • Manually tested sharing a single contact from the default Android Contacts app. The app appeared in the share sheet and successfully imported the contact.
  • Manually tested sharing multiple contacts. The app correctly handled the list of contacts.
  • Tested by opening a .vcf file directly from a file manager. The app opened and processed the file.

Before

ignoreImageMinify

After

ignoreImageMinify

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • All checks are passing.

@vijay2909 vijay2909 requested a review from naveensingh as a code owner October 7, 2025 07:04
@naveensingh
Copy link
Member

This is unnecessarily verbose and looks AI-generated. Please avoid creating PRs using coding agents (for now).

@naveensingh naveensingh closed this Oct 7, 2025
@vijay2909
Copy link
Author

Fair point, it was a bit much. I've shortened it to be more direct.

Just to be clear, I use AI to help polish my notes, but the code and the fix are my own work.

Anyway, let me know what you think of the actual implementation. I'm confident it solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sharing a Contact doesn't offer Fossify Contacts

2 participants