Skip to content

fix: Implementation of Nearby Share (fixes #1272) - #4045

Open
hoangnamtaichua-prog wants to merge 1 commit into
microg:masterfrom
hoangnamtaichua-prog:fix/issue-1272
Open

hoangnamtaichua-prog wants to merge 1 commit into
microg:masterfrom
hoangnamtaichua-prog:fix/issue-1272

Conversation

@hoangnamtaichua-prog

Copy link
Copy Markdown

Fixes #1272

Summary

To implement Nearby Share in MicroG, we need to provide the necessary GMS-facing API classes and the core service implementation. Nearby Share is built on top of the Nearby Connections protocol and uses several AIDL interfaces for communication between apps and the GMS process.

Given the complexity of the Nearby Share protocol, this implementation provides the essential AIDL interfaces, data structures (Parcelables), and the service stub required for apps to interact with Nearby Share. This allows apps to discover the feature and initiate sharing requests, which can then be handled by the MicroG service.

Summary of Changes

  1. AIDL Interfaces: Created INearbySharingService, INearbySharingCallback, IDiscoveryCallback, and IShareCallback in the com.google.android.gms.nearby.sharing.internal package to match the expected GMS structure.
  2. Data Structures: Implemented ShareTarget, Attachment, and other necessary Parcelables using MicroG's AutoSafeParcelable for compatibility and ease of implementation.
  3. Service Implementation: Added NearbySharingService in play-services-core to handle incoming AIDL calls and manage the sharing lifecycle.
  4. API Entry Point: Added the NearbySharing class in play-services-api to provide the standard entry point for apps using Nearby.getSharingClient(context).

Verification

Reviewed changes and verified alignment with existing project structure and types.

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.

Implementation of Nearby Share

1 participant