How to use Obsidian URI:s without opening the app?

I’m using Android.

What I’m trying to do

I’m trying to append text to an Obsidian note without opening Obsidian by sending an intent from Tasker. I’ve created a dialog with Tasker to send “Quick notes” to Obsidian, appending whatever I type in to this dialog to a specific note in Obsidian.

Things I have tried

I’ve searched the net and these forums for any sign of a “Broadcast Receiver” in Obsidian. As far as I understand it, this can’t be done with an “Activity” intent. An activity intent always starts the app that it calls, bringing it into the foreground. (stack overflow post about Services and Broadcast Receivers) The Obsidian URI help guide doesn’t say anything about this as far as I can tell.

I did find this: quick-way-to-add-or-append-notes-without-opening-obsidian-android-tutorial, which describes a way to append text directly to the markdown file. This is a way to do it but it is less dynamic and relies on the absolute paths to the Obsidian vault.

So my question is: is it possible to send intents to Obsidian without bringing it into the foreground?

Here’s my tasker test task:

    A1: Variable Set [
         Name: %new_val
         To: 
         - [ ] My test text to append
         Structure Output (JSON, etc): On ]
    
    A2: Variable Convert [
         Name: %new_val
         Function: URL Encode
         Store Result In: %url
         Mode: Default ]
    
    A4: Variable Search Replace [
         Variable: %url
         Search: \+
         Multi-Line: On
         Replace Matches: On
         Replace With: %20 ]
    
    A5: Send Intent [
         Action: android.intent.action.VIEW
         Cat: None
         Data: obsidian://new?vault=My\%20Vault&file=aFolder\%2FNote.md&append=true&silent=true&content=%url
         Target: Activity ]

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