Sync folder/file detection in Android

In my application, I want to allow the user to select a file, which comeback as a URI. This URI can natively resolve to a file path. I want to determine whether the file is stored locally or if it’s from a synced cloud storage provider such as Google Drive, OneDrive, Dropbox, etc.
Is there a reliable way to detect whether a given file (from a URI or resolved path) originates from a synced cloud provider? If so, how can I identify which service it belongs to (e.g., Google Drive vs. OneDrive)?
tried solution: I have tried checking authority strings that comes in uri but it does not reliable as
Authority Strings Can Change These authority strings are defined by the respective apps and are not part of any official Android API contract. They can change between app versions.
False Positives A match on an authority string does not necessarily guarantee that the file is from a particular cloud provider. For example, some cloud apps may use generic storage providers (like download folder).
Not Comprehensive This method does not account for all potential cloud providers.