iamrasel / lunar-launcher

Feature rich android home with minimal look. 🇵🇸
GNU General Public License v3.0
461 stars 41 forks source link

Open-Meteo weather provider #10

Open DadiBit opened 2 years ago

DadiBit commented 2 years ago

Checklist

Feature description

Hello, I would like to help implement the Open-Meteo API in the launcher, as it requires no API key (hence it's more user-friendly). I'm currently the only contributor to the open-meteo-api-kotlin library, and I haven't finished it, but I feel like to could benefit this project. Some "pseudo-code":

If you need the weather forecast, I would recommend to instead:

*Note: if GPS auto-location were to be implemented, it would be easy to update the coordinates (next version will have var coordinates)

Additional information

A nice feature of the API is that it provides hourly/daily values up to a week, easing data caching. I'd like also to receive some inputs on how I could make the library more accessible to other developers (I know that the documentation and tests are completely missing in version 0.2.0-alpha, please have mercy), in order to ease the transaction to it.

iamrasel commented 2 years ago

What to input as location? Longitude-latitude or city name?

DadiBit commented 2 years ago

What to input as location? Longitude-latitude or city name?

Currently the client constructor accepts:

iamrasel commented 2 years ago

Okay, i'll try it. Thanks for the suggestion.

DadiBit commented 2 years ago

I did some testing and I realized the library is just overkill for the launcher (1+ MB = too heavy): I'll work on a fork without implementing the library, but instead implementing the useful parts (protobuf isn't needed, as only one city name is retrieved).

iamrasel commented 2 years ago

You can open a pull request for a successful implementation, thanks.

HeCodes2Much commented 1 year ago

if the app can some how get the Longitude-latitude via location and still be able to be on fdroid aka no play services that would be good then the weather could also auto update location

iamrasel commented 1 year ago

@The-Repo-Club I think, inputting location data manually is more privacy friendly.

HeCodes2Much commented 1 year ago

ya having the option if wanting to would be nice though doesn't need to be on by default :)