Coder Social home page Coder Social logo

basshelal / unsplashphotopicker Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 7.0 18.52 MB

๐Ÿ“ท Android Library providing a photo picker to search and download photos from Unsplash

License: MIT License

Kotlin 100.00%
android android-library kotlin kotlin-android photo-picker unsplash

unsplashphotopicker's Introduction

unsplashphotopicker's People

Contributors

basshelal avatar goui avatar ocollet 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

Watchers

 avatar  avatar  avatar

unsplashphotopicker's Issues

Add callbacks for errors / error states

Basically when the RecyclerView will be empty we need a way to allow for a callback that will allow us to do something when something goes wrong.
I can think of 3 error states:

  • No results (Search returned no results)
  • No connection (Internet connection error)
  • Generic error (Something else)

We mainly want this so that the caller can add Views/Layouts to display when one of these happens and callbacks too to maybe act accordingly as well.

Add Proguard rules for models to prevent NullPointerException

I'm recieving Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'char java.lang.String.charAt(int)' on a null object reference inside UnplashPickerAdapter.onBindViewHolder() with minifyEnabled true.

Solution:

-keep class com.github.basshelal.unsplashpicker.data* {*;}
-keepclassmembers class com.github.basshelal.unsplashpicker.data* {
    <fields>;
    <init>();
    <methods>;
}

Unsplash API Endpoint calls return null values on some parameters

I'm not sure where this is exactly, but the calls seem to be returning null for some parameters consistently, like there's a pattern.

For an UnsplashPhoto its urls will always have medium == null and large == null

This needs investigation because the backend code is so goddamn unnecessarily confusing for now reason!

Remove unnecessary abstractions

Remove all the unnecessary classes and files and simplify backend code into fewer entities because currently it's a maze of classes and files that get called only once!

Determine and notify if an `UnsplashPhoto` is Sponsored

Unsplash has (recently?) added Sponsored photos. This isn't part of the official API (yet?) but there is a way to find out if an image is sponsored or not so we should use this to determine and show if a photo is sponsored

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.