GithubHelp home page GithubHelp logo

mercandj / android-dev-challenge-compose-4 Goto Github PK

View Code? Open in Web Editor NEW
161.0 2.0 24.0 97.72 MB

Weather app done in Jetpack Compose for the #AndroidDevChallenge 2021 ๐ŸŒฆ โ˜€๏ธ. Neumorphism UI.

Home Page: https://developer.android.com/dev-challenge

License: Apache License 2.0

Kotlin 100.00%
jetpack-compose androiddevchallenge androiddevchallenge-compose neumorphism android-weather android-weatherapp jetpackcompose

android-dev-challenge-compose-4's Introduction

GitHub Cards Preview

C-Weather: Compose with weather

Workflow result

Requirement: Replace WeatherApiManagerImpl#YOUR_KEY_HERE_WITH_FORECAST_AVAILABLE by your openweathermap key

๐Ÿ“œ Description

๐Ÿ’ก Motivation and Context

What am I proud of?

  • Split UI and logic
  • "Useful" app
    • -> Real data forecast
    • -> Persistence of the forecast
    • -> Change your City / temperature Unit
  • Neumorphism UI

๐Ÿ“ธ Screenshots

โ€ƒ โ€ƒ โ€ƒ โ€ƒ โ€ƒ

Side notes

This is the first time I'm trying Jetpack Compose. Even if the spirit seems to be reactive paradigm, I will try to use it on a more "classic" way.

Why?

  • Because, if one day I will use this techno in production, I will need a "transition" phase to not move all my code to the "reactive" way.
  • Because stay "non reactive" is easier for the reactive-beginner that I am. I hope that my project demonstrates that Jetpack Compose work well without intensive use of ViewModel, LiveData...
  • Because stay "non reactive" allow you to produce almost the same code on any platform easily (Unity, iOS, server...)

My goals will be:

  • Discover Jetpack Compose
  • Split as much as possible logic from the UI with the good old "MVP"
  • Great UI / Great app quality (app we can publish on Google Play)

Architecture

  • Code and resources split by feature instead of layer to be able to scale
  • DepInjection done manually and user Dagger notions: graph, module, manager...
  • Basic MVP explicit in Contract interfaces

Bonus

  • Translated in french ๐Ÿ‡ซ๐Ÿ‡ท

Requirement if you a coming from "stable Android Studio" on MacOs

  • Download Java 11 (for example here)
  • Add it like that: /Users/jonathan/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk
  • If cannot open the jdk due to mac os permission, here a tip)

Thank you to:

License

Copyright 2020 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

android-dev-challenge-compose-4's People

Contributors

jonathanmercandalli avatar mercandj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

android-dev-challenge-compose-4's Issues

App crashes on startup due to a parsing JSONException

Stacktrace:

2021-07-09 09:52:46.558 10151-10468/com.example.androiddevchallenge E/AndroidRuntime: FATAL EXCEPTION: weather_load
    Process: com.example.androiddevchallenge, PID: 10151
    org.json.JSONException: No value for weather
        at org.json.JSONObject.get(JSONObject.java:400)
        at org.json.JSONObject.getJSONArray(JSONObject.java:595)
        at com.example.androiddevchallenge.weather_api.WeatherApiManagerImpl.getWeather(WeatherApiManagerImpl.kt:49)
        at com.example.androiddevchallenge.weather.WeatherManagerImpl$load$1.run(WeatherManagerImpl.kt:41)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:246)
        at android.os.HandlerThread.run(HandlerThread.java:67)

Root cause: Wheather API throws 429.

{
  "cod": 429,
  "message": "Your account is temporary blocked due to exceeding of requests limitation of your subscription type. Please choose the proper subscription http://openweathermap.org/price"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.