podverse / podverse-rn

Podverse mobile app written in React Native for iOS, Android, and F-Droid
https://podverse.fm/about
GNU Affero General Public License v3.0
213 stars 37 forks source link

Android Widget #1186

Open TheHesster opened 2 years ago

TheHesster commented 2 years ago

Hi there! Just wondering if there is a widget for Android in the works? I'm a Pocket Casts user and have recently started trying out podverse after hearing about it on Jupiter Broadcasting shows. I use the widget extensively in pocket casts so I'm just hopeful there will be a podverse widget in the near future. Thanks for all the hard work! Wish I knew how to contribute to the project but my coding skills are lacking!

mitchdowney commented 2 years ago

@TheHesster thanks for the request! My understanding is that the Android widget should begin working out-of-the-box when we update to react-native-track-player v3.x https://github.com/podverse/podverse-rn/issues/1179

We want to be cautious with that update though, as moving from 2.x to 3.x is a major change that could introduce new issues. It's a high priority initiative though, and I expect we'll have this finished sometime this fall.

TheHesster commented 2 years ago

Ah I see! Thanks for the info. Looking forward to it!

-Adam

johnmckinzie commented 1 year ago

This would be great!

mitchdowney commented 1 year ago

After beginning to look into this...it appears we will need to write significant amount of Android code. Unfortunately I am not a good Android developer, and this will take me a lot more time to do alone than I could if someone with Android experience could help. (It is generally a huge problem that no one on our team really has Android development experience...we know React Native and iOS, but are hanging on for dear life trying to code Android)

I'm going to unassign it from me for now, as it looks too much work for me to do in the near future.

TheHesster commented 1 year ago

I want to learn how to develop apps for Android but currently have 0 experience. I wouldn't mind helping with this though if I can get my footing.

mitchdowney commented 1 year ago

Cool! I would be happy to introduce the local dev environment and app workflow for you, but I wouldn't be much help with the Android XML and Java work required.

If you have the React Native development environment installed locally, then running the app on your computer should be as simple as:

Run this once:

cp ./.env.dev.example ./.env

Then to install dependencies:

./clean.sh

Then to run the app:

npm run dev:android

So it's should be really easy if your environment is prepared for React Native, but you'd have to go through the React Native environment steps first. Here is the official documentation: https://reactnative.dev/docs/environment-setup

I would recommend following those steps to run their "hello world" application first, then trying to run Podverse. Anyway, if you have general questions about setting up the dev environment, please feel free to reach us on Matrix or Discord.

mitchdowney commented 1 year ago

@TheHesster actually, if you managed to even just get a player widget appearing, with buttons and some placeholder data (an podcast title, episode title, image, play/pause, time jump), then @kreonjr and I could probably help with figuring out how to connect those components to our player methods.

TheHesster commented 1 year ago

Sounds good thanks! I will give it a go sometime soon.

mitchdowney commented 11 months ago

Another listener requested an Android Widget, and they provided a very detailed explanation about how they typically behave for podcast apps. I'm going to copy and paste their description here as it may be useful as acceptance criteria for the widget:

You are correct in the understanding that a widget is just some controls and indicators for your app that appear on the home screen of the android phone. The size of the widget is based on the usual size of an icon on the home screen. Minimum size would be 1x1 taking up the space that a normal icon for the app would have. Usually other podcast or audio player apps have a 4x1 size app. this would be the size of 4 icons wide and 1 icon size high. Your app can have support for multiple widgets of different dimensions. I would think on a 1x1 you might be able to squeeze in the name of the podcast and a play/pause button but not much more. For a 4x1 you would have the name, play/pause, position indicator, maybe skip forward and skip reverse, etc. The idea of the widgets is that the user has access to the controls at all times. When the phone is locked, use the lock screen, when the phone is on the home screen, use the widget, when the phone is playing another app, use the notification space etc.

Here is a screenshot of what my homescreen looked like when I was using another podcast program that has the widget. I suggest you have options for the widget so some problematic buttons could be removed. For example I don't use the skip track button because an accidental press of that can send me to the next episode, and thus deleting the episode I was listening to and then I have to download that all over again.

image