Help me integrate Obsidian with my Android app | React Native Develpment

What I’m trying to do

I want to integrate Obsidian to my Android app (written in React Native):
This is what I want to obtain:
→ User click share in an Obsidian page
→ User click my app icon
→ Using the library react-native-receive-sharing-intent I receive the following object in my app:

{
    "contentUri": "content://md.obsidian.fileprovider/my_images/Documents/MyVault/Folder1/Hello.md", 
    "fileName": "Herc.md", 
    "filePath": "/data/user/0/com.xxxxxxxx.xxxxxxx/cache/Hello.md",
    "mimeType": "text/markdown", 
    "subject": null, 
    "text": null, 
    "weblink": null
  }

→ My goal now is to be able to reopen the same file from my App to Obsidian

Things I have tried

I read this, and this works:

Linking.openURL('obsidian://open?vault=MyVault&file=Folder1/Hello.md')

The problem is:

Starting from the contentUri string, how can I programmatically understand which is the Vault and which is the file? There may be different sub folders.

I tried with the path parameters with no success:

Linking.openURL('obsidian://open?path=/my_images/Documents/MyVault/Folder1/Hello.md')

Any idea?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.