I’m a web developer, mostly with Python and have close to zero Java or Kotlin experience, but I want to build a bunch of tools for my phone where I can Share a URL (for example) to an app that simply takes that URL string and sends an HTTP POST request to a pre-arranged URL with some pre-arranged headers or POST data.

So basically I’m looking for an app that:

  • Lets you define a series of endpoints
  • Accepts share intents from other apps to then bring up a selector asking “Which endpoint do you want to send this to?”, sends it, and exits.

It seems a little nuts that I should have to develop a separate app for each endpoint, when the app experience isn’t really something I’m interested in. Can someone here point me to an app that already does something like this? I’d prefer a FOSS option if possible, but at this point I don’t even know what to search for.

Example use-cases:

  • Send a YouTube URL to a service that downloads said video and stores it on a share on my VPN
  • Send a text snippet to a service that stores that snippet as a Markdown file for use as ideas for future blog posts
  • Send an article URL to a service that strips the ads and images out and saves a Markdown file for future reading.
  • SEO-Nayan929@thebrainbin.org
    link
    fedilink
    arrow-up
    1
    ·
    1 day ago

    You can check out Tasker, a powerful Android automation app that might help with your use case. You can create custom actions for HTTP POST requests triggered by share intents. For instance, you can define a task to send a URL to a specific endpoint, and then have Tasker execute the HTTP POST with the necessary headers and data. It’s a bit of a learning curve, but there are plenty of resources online to get started.

    By the way, you can also check out this link for viewing Markdown files more easily.

  • catloaf@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    I’m also more familiar with web dev, so you might just slap together a web app as a PWA, configure it as a share target, and install that, instead of learning the whole android app dev process.

    • Daniel QuinnOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      Woah, you can configure a website as a share target? How do I do that?

      • catloaf@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        I just googled “PWA share target” and got a bunch of results. I’m sure some of them will be relevant to you.

  • LiveLM@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 days ago

    I think the only thing that could come close to what you want would be an automation centric app like Tasker or Automate. Neither are FOSS, but they’re really good.

    Edit: Found exactly what you need on F-Droid, it’s called HTTP Request Shortcuts.

  • PetteriPano@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 days ago

    I like to make bookmarklets for these kind of things.

    Just make a page with a link that runs a javascript snippet. Drag that link to your bookmark bar, and you have a new action button. Firefox syncs them from desktop to mobile, there’s probably a way to add them straight on your mobile browser, too.

    The snippet could post the current URL, post what you’ve currently selected. Tinyurl has an example for creating a tinyurl from where you are - probably a good starting point.

    I’ve got one that posts to my personal URL shortener. One that grabs metadata from a ticketing system and makes nice linky markdown in my clipboard for me to paste on slack.

      • PetteriPano@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        They work on both desktop and android versions of Firefox, at least. I haven’t tried other android browsers, but I’d expect it to work.

  • turmacar@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    Are you looking for something like Pocket?

    There are self-hosted things a lot like it. Vivaldi and some other browsers have similar functionality. Not sure about downloading the videos, but there are other tools for that.

    • Daniel QuinnOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      Pocket will fill in a pinch, but it’s a very specific use cases and I’m looking for something more general. For example, it’d be nice to write something that accepts location data from Google maps and dumps it on a database for plotting later if something. I’m looking for a general tool that lets me be creative with my phone :-)

      • turmacar@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        There’s always Tasker.

        It’s stupidly powerful once you get used to how it works, even without root, and it can definitely patch into the default “share” functionality.

        • Daniel QuinnOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 days ago

          I’d forgotten about Tasker. I’ll give that a try, thanks!