๐Ÿ”— Redirect Bluesky links to your preferred client
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(docs): update readme

Turtlepaw d28d8b4e 3865eef6

+43 -138
+43 -138
README.md
··· 1 - # Fediverse Redirect 2 - A simple suite of apps for automatically launching fediverse links in your preferred Mastodon or Lemmy client. 3 - 4 - ## Use-Cases 5 - Mastodon and Lemmy are both examples of federated social media. This is mostly a good thing, for a whole host of reasons, but it does have one notable disadvantage: deep linking support. 1 + # Bluesky Redirect 2 + Automatically launch Bluesky (and other client) links in your preferred Bluesky client. 6 3 7 - When you tap a Twitter link in your browser and your phone opens the Twitter app instead of the Twitter website to view the post, that's an example of deep linking. The trouble with federated social media is three-fold: 8 - 1. There are a lot of different instances at different addresses running the same or interoperable software. 9 - 2. Android only lets app developers declare supported deep link domains at compile time: users can't add custom domains, and domains can only be added through app updates. Many developers understandably don't want to maintain a list of thousands of domains. 10 - 3. Android really isn't set up for a single app to support more than a few different domains for deep links. 4 + ## Features 11 5 12 - Fediverse Redirect aims to solve the first two issues and somewhat solve the third. 13 - 14 - By using [Fediverse Observer](https://fediverse.observer) as a data source, Fediverse Redirect can maintain an up-to-date list of active domains. 15 - 16 - Once you download the app, you can choose your client app and then enable all supported domains, so that when you tap a recognized link, it gets passed to the proper Fediverse Redirect variant. 17 - 18 - The Fediverse Redirect variant then sends the link directly to the chosen client app for it to handle. 19 - 20 - Since the point of Fediverse Redirect is only to change where supported links open, the maintenance of supported domains isn't extra busywork that has to be done in addition to other features and fixes; it's literally all the app does. 21 - 22 - Client developers do need to do some work for Fediverse Redirect to support them, but it's a one-time thing, and instructions are available below. 6 + - Multi-client support, e.g. deer.social links will open in Catsky 23 7 24 8 ## Screenshots 25 9 26 - <img alt="Mastodon Redirect clients list" src="https://github.com/zacharee/MastodonRedirect/assets/9020352/839496b6-827f-4b90-a322-f6c33772354e" width="400"> <img alt="Lemmy Redirect clients list" src="https://github.com/zacharee/MastodonRedirect/assets/9020352/353cc22a-0bfc-4497-bcb0-6214be7a63c4" width="400"> <img alt="Mastodon Redirect options dialog" src="https://github.com/zacharee/MastodonRedirect/assets/9020352/e3853f1c-082e-4e87-859b-7df95b5ebc8f" width="400"> <img alt="Supported domains list with options to ignore specified domains" src="https://github.com/zacharee/MastodonRedirect/assets/9020352/a5acb398-7f54-42e2-bb5a-561feed4ae08" width="400"> 10 + <img alt="List of supported clients" src="https://tangled.org/@turtlepaw.on.computer/bluesky_redirect/raw/main/app/fastlane/metadata/android/en-US/images/phoneScreenshots/01.png" width="400"> <img alt="@mary.my.id's tangled profile with an overlay with text: Open Bluesky Profile with" src="https://tangled.org/@turtlepaw.on.computer/bluesky_redirect/raw/main/app/fastlane/metadata/android/en-US/images/phoneScreenshots/02.png" width="400"> 27 11 28 12 ## Downloads 29 13 Fediverse Redirect has different variants depending on which social media network you want to use. Download the appropriate APK for your desired social network below. 30 14 31 15 ### GitHub 32 - [![GitHub Release](https://img.shields.io/github/v/release/zacharee/MastodonRedirect?style=for-the-badge&logo=github&label=Mastodon%20%2B%20Lemmy%20Redirect&color=orange)](https://github.com/zacharee/MastodonRedirect/releases) 16 + [![GitHub Release](https://img.shields.io/github/v/release/turtlepaw/BlueskyRedirect?color=74c7ec&labelColor=303446&style=for-the-badge&logo=github&label=Bluesky%20Redirect&logoColor=cdd6f4)](https://github.com/turtlepaw/BlueskyRedirect/releases) 17 + 18 + [![Obtainium](https://img.shields.io/badge/obtainium-blue?color=74c7ec&labelColor=303446&style=for-the-badge&logo=obtainium&logoColor=cdd6f4)](https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://github.com/turtlepaw/BlueskyRedirect/releases) 33 19 34 20 ### IzzyOnDroid 35 - [![Mastodon Redirect](https://img.shields.io/endpoint?url=https%3A%2F%2Fapt.izzysoft.de%2Ffdroid%2Fapi%2Fv1%2Fshield%2Fdev.zwander.mastodonredirect&style=for-the-badge&logo=f-droid&label=Mastodon%20Redirect)](https://apt.izzysoft.de/fdroid/index/apk/dev.zwander.mastodonredirect/) 36 - [![Lemmy Redirect](https://img.shields.io/endpoint?url=https%3A%2F%2Fapt.izzysoft.de%2Ffdroid%2Fapi%2Fv1%2Fshield%2Fdev.zwander.lemmyredirect&style=for-the-badge&logo=f-droid&label=Lemmy%20Redirect)](https://apt.izzysoft.de/fdroid/index/apk/dev.zwander.lemmyredirect/) 37 - [![PeerTube Redirect](https://img.shields.io/endpoint?url=https%3A%2F%2Fapt.izzysoft.de%2Ffdroid%2Fapi%2Fv1%2Fshield%2Fdev.zwander.peertuberedirect&style=for-the-badge&logo=f-droid&label=PeerTube%20Redirect)](https://apt.izzysoft.de/fdroid/index/apk/dev.zwander.peertuberedirect/) 21 + <!-- [![Mastodon Redirect](https://img.shields.io/endpoint?url=https%3A%2F%2Fapt.izzysoft.de%2Ffdroid%2Fapi%2Fv1%2Fshield%2Fdev.zwander.mastodonredirect&style=for-the-badge&logo=f-droid&label=Mastodon%20Redirect)](https://apt.izzysoft.de/fdroid/index/apk/dev.zwander.mastodonredirect/) --> 22 + 23 + soon 38 24 39 25 ## Supported Domains 40 - Currently, most domains on [Fediverse Observer](https://fediverse.observer) are supported. 41 26 42 - Fediverse Redirect supports most active and alive instances, but excludes dead instances and instances that haven't had any activity recently. This is to keep the list as short as possible and avoid crashes. 43 - 44 - Fediverse Redirect also supports the `web+activity+http`, `web+activity+https`, and `web+ap` URL schemes. The expectation is that the full post or profile URL will follow. 45 - 46 - Examples: 47 - ``` 48 - // Post 49 - web+ap://androiddev.social/@wander1236/110699242324667418 50 - 51 - // Profile 52 - web+ap://androiddev.social/@wander1236 53 - ``` 54 - 55 - [Fedi Links Project](https://fedilinks.org/). 27 + - bsky.app 28 + - main.bsky.app 29 + - deer.social 30 + - deer-social-ayla.pages.dev 31 + - catsky.social 32 + - social.daniela.lol 56 33 57 34 ## Setup 58 - If any domains aren't enabled for handling by the Fediverse Redirect variant, the app will let you know and provide you buttons for enabling them. 35 + If any domains aren't enabled for handling, the app will let you know and provide you buttons for enabling them. 59 36 60 - Enabling each supported domain one at a time is possible, but tedious. Instead, Fediverse Redirect can use [Shizuku](https://shizuku.rikka.app) to automatically enable all links at once. The setup for Shizuku is a little complex, but can be done completely on-device on Android 11 and later. It is also only needed once for the initial setup or for enabling domains added in app updates. 37 + Enabling each supported domain one at a time is possible, but tedious. Instead, you can use [Shizuku](https://shizuku.rikka.app) to automatically enable all links at once. The setup for Shizuku is a little complex, but can be done completely on-device on Android 11 and later. It is also only needed once for the initial setup or for enabling domains added in app updates. 61 38 62 - Alternatively, you can use [LinkSheet](https://github.com/1fexd/LinkSheet) to have supported domains open in Fediverse Redirect. LinkSheet needs to be set as your default browser and then acts as a much more comprehensive and usable version of Android's built-in link handling options. 39 + Alternatively, you can use [LinkSheet](https://github.com/1fexd/LinkSheet) to have supported domains open. LinkSheet needs to be set as your default browser and then acts as a much more comprehensive and usable version of Android's built-in link handling options. 63 40 64 41 ## Usage 65 - Open the chosen Fediverse Redirect variant and select your preferred client. 42 + Open the Bluesky Redirect and select your preferred client. Bluesky Redirect currently supports the following clients: 66 43 67 - ## Client Support 68 - Unfortunately, many Fediverse clients don't have a way for Fediverse Redirect to interface with them. 44 + - [Bluesky](https://github.com/bluesky-social/social-app/) 45 + - [Catsky](https://github.com/NekoDrone/catsky-social/). 46 + - [Deer.social](https://github.com/a-viv-a/deer-social). 47 + - [Deer Social Ayla](https://github.com/ayla6/deer-social-test). 69 48 70 - Fediverse Redirect relies on clients having a link sharing target that can parse and open fediverse links. 71 - 72 - Clients such as Tusky do have share targets, but they can only be used to create new posts, with the shared link as the content. Other clients have no share targets at all. 73 - 74 - Mastodon Redirect currently supports the following clients: 75 - - [Elk (PWA: Stable or Canary)](https://github.com/elk-zone/elk). 76 - - [Fedilab (F-Droid or Play Store)](https://github.com/stom79/Fedilab). 77 - - [Mastodon](https://github.com/mastodon/mastodon-android). 78 - - [Megalodon](https://github.com/sk22/megalodon). 79 - - [Moshidon (Stable or Nightly)](https://github.com/LucasGGamerM/moshidon). 80 - - [Phanpy (PWA: Stable or Dev)](https://hachyderm.io/@phanpy). 81 - - [Subway Tooter](https://github.com/tateisu/SubwayTooter). 82 - - [Tooot](https://github.com/tooot-app/app). 83 - - [Trunks (Native or Web)](https://mastodon.social/@trunksapp). 84 - 85 - --------------------------- 86 - 87 - Lemmy Redirect currently supports the following clients: 88 - - [Eternity](https://codeberg.org/Bazsalanszky/Eternity). 89 - - [Jerboa](https://github.com/dessalines/jerboa). 90 - - [Liftoff](https://github.com/liftoff-app/liftoff). 91 - - [Summit](https://lemmy.world/c/summit). 92 - - [Sync](https://github.com/laurencedawson/sync-for-lemmy). 93 - - [Thunder](https://github.com/thunder-app/thunder). 94 - - [Voyager (1.46.0 and later)](https://github.com/aeharding/voyager). 95 - 96 - And the following auto-discovery clients: 97 - - [Raccoon](https://github.com/diegoberaldin/RaccoonForLemmy). 98 - 99 - --------------------------- 100 - 101 - PeerTube Redirect currently supports the following clients: 102 - - ~~[Fedilab (F-Droid or Play Store)](https://github.com/stom79/Fedilab)~~ (Currently disabled as link handling is broken). 103 - - ~~[Grayjay (Stable, Unstable, or Play Store)](https://grayjay.app)~~ (Currently disabled as the PeerTube plugin only respects Grayjay's instance domain and also uses the wrong URL format to check for compatibility). 104 - - [NewPipe (Release or Debug-Main)](https://github.com/TeamNewPipe/NewPipe). 105 - - [Tubular (Release or Debug-Main)](https://github.com/polymorphicshade/Tubular). 106 - 107 - If your favorite client isn't on the list, consider creating an issue on their code repository or issue tracker linking to the section below, ***but please search through the existing issues first, including ones that have been closed***. Pestering developers won't help anyone. 49 + If your favorite client isn't on the list, consider creating an issue, ***but please search through the existing issues first, including ones that have been closed***. Pestering developers won't help anyone. 108 50 109 51 ## Adding Client Support 110 - If you're the developer of a Fediverse client and want to add support for Fediverse Redirect into your app, here's how. 52 + If you're the developer of a Bluesky client and want to add support for Bluesky Redirect into your app, here's how. 111 53 112 54 ### Automatic 113 - You can let Fediverse Redirect automatically discover your app by filtering for a custom Intent and parsing the data as a URL. 55 + 56 + wip 57 + <!-- You can let Bluesky Redirect automatically discover your app by filtering for a custom Intent and parsing the data as a URL. 114 58 115 59 #### Create a discoverable target. 116 60 In your `AndroidManifest.xml`, add the following intent filter inside the relevant Activity tag: ··· 154 98 // Pass it to your internal link parser to find the post ID and such. 155 99 // Open in your thread/profile viewer component. 156 100 } 157 - ``` 101 + ``` --> 158 102 159 103 ### Manual 160 - The high level process is pretty simple: expose some way for your app to be launched that accepts a URL and tries to parse it as a fediverse link to open as a post or profile. There are a few ways you can do this. 104 + The high level process is pretty simple: expose some way for your app to be launched that accepts a URL and tries to parse it as a bluesky link to open as a post or profile. There are a few ways you can do this. 161 105 162 - Once you've implemented support, feel free to open an issue or PR to have it added to Fediverse Redirect. 106 + Once you've implemented support, feel free to open an issue or PR to have it added to Bluesky Redirect. 163 107 164 108 #### Create a share target. 165 - Note: this will cause your app to appear in the share menu when a user chooses to share any text, not just links. If your app already has a share target for pasting the shared text into a new post draft, it might make sense to reuse that target with an option to open the shared link instead of only creating a new post. 166 - 167 - Check out [Moshidon](https://github.com/LucasGGamerM/moshidon/blob/master/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java) for an example. 168 - 169 - In your `AndroidManifest.xml`, add the following intent filter inside the relevant Activity tag: 170 - 171 - ```xml 172 - <intent-filter> 173 - <action android:name="android.intent.action.SEND"/> 174 - <category android:name="android.intent.category.DEFAULT"/> 175 - <data android:mimeType="text/*"/> 176 - </intent-filter> 177 - ``` 178 - 179 - Inside the Activity itself: 180 - 181 - ```kotlin 182 - override fun onCreate(savedInstanceState: Bundle?) { 183 - // ... 184 - 185 - if (intent?.action == Intent.ACTION_SHARE) { 186 - val sharedText = intent.getStringExtra(Intent.EXTRA_TEXT) 187 - 188 - // Validate that `sharedText` is a URL. 189 - // Pass it to your internal link parser to find the post ID and such. 190 - // Open in your thread/profile viewer component. 191 - } 192 - } 193 - ``` 194 109 195 110 #### Create a view target. 196 111 This is similar to the share target, but won't show up to users directly in the share menu. ··· 224 139 ``` 225 140 226 141 ## Building 227 - In order to build Fediverse Redirect, you'll need two things: 228 - 1. The latest [Android Studio Canary](https://developer.android.com/studio/preview) build. 229 - 2. ~~A [modified Android SDK](https://github.com/Reginer/aosp-android-jar) with hidden APIs exposed.~~ 230 - 231 - ~~Download the modified SDK corresponding to Fediverse Redirect's current `compile.sdk` value (found in [gradle.properties](https://github.com/zacharee/MastodonRedirect/tree/main/gradle.properties)) and follow the instructions provided in the link above to install it.~~ 232 - 142 + In order to build Bluesky Redirect, you'll need the latest [Android Studio Canary](https://developer.android.com/studio/preview) build. 233 143 ## Contributing 234 - If you want to add support for another app: 144 + If you want to add support for another app to **Bluesky Redirect**: 235 145 236 - 1. Find the `LaunchStrategy.kt` file for the relevant variant. For example, if you want to add support for an app to Lemmy Redirect, open `lemmyredirect/src/main/java/dev/zwander/lemmyredirect/util/LaunchStrategy.kt`. 237 - 2. Go to the `strings.xml` file for the variant and add the name of the app there. 238 - 3. Create a new data object extending the relevant `LaunchStrategyRootGroup` class (for Lemmy, it would be `LemmyLaunchStrategyRootGroup`). The argument the base class takes is a reference to the string resource you added. 239 - 4. Nested in that object, create another object extending the relevant `LaunchStrategy` class. This takes a key (unique to the app) and a variant label reference. 240 - 5. Override the `createIntents()` function and return a list of Intents to attempt to launch. Usually, only one Intent is needed. 241 - 6. Make sure to annotate both objects with `@Keep`. 242 - 243 - Fediverse Redirect will automatically pick up the new class and show it as an option. 244 - 245 - Check out the other objects in the file for examples. 146 + 1. Find the `LaunchStrategy.kt` file in the `app` module: 147 + `app/src/main/java/io/github/turtlepaw/blueskyredirect/app/util/LaunchStrategy.kt` 148 + 2. Add the app's name to the `strings.xml` file for Bluesky Redirect. 149 + 3. Create a new data object that implements `BlueskyClientLaunchStrategy`. 150 + 5. Override the `createIntents()` function and return a list of Intents to launch the app. Usually, only one Intent is needed. 151 + 6. Annotate both objects with `@Keep`. 246 152 247 - ## Error Reporting 248 - Fediverse Redirect uses Bugsnag for error reporting. 153 + Bluesky Redirect will automatically detect the new class and show it as an option. 249 154 250 - <a href="https://www.bugsnag.com"><img src="https://assets-global.website-files.com/607f4f6df411bd01527dc7d5/63bc40cd9d502eda8ea74ce7_Bugsnag%20Full%20Color.svg" width="200"></a> 155 + Refer to the existing objects in the file for examples.