DEV Community

Cover image for Advice - Android application to get automated advice
Shafiq Mustapa
Shafiq Mustapa

Posted on

Advice - Android application to get automated advice

Appreciated if you guys can download my app Advice on Play Store

API

I'm always a sucker for public API . One day on January 2019, I've discovered a public api for advice. Similar to quotes (I hate quotes) but more to advice. Here is the api -> Advice Slip.

Open up my Android Studio and create a new project, A Peace of Advice. Supply the url for getting an advice GET will return

{
slip: {
advice: "What's stopping you?",
slip_id: "159"
}
}
Enter fullscreen mode Exit fullscreen mode

Android

So, when open up my app, the MainActivity will get an advice. Simple. But how to get a new advice? I don't want my user to open and close my app just to get the new advice.

So I have implemented a Swipe Down gesture (pull to refresh) and my app will return a new advice. The simple part is now done but the app is too minimal. I search for UI in Pinterest on how to present a readable font and what the color schemes that I will have to choose to make it pleasant on the eyes of my user.

Font

For advice text I will be using Abril Fatface and for the copyright text I choose Lato Thin

Unsplash

Still the app lack of something visual. I need a collection of portrait wallpaper that is refreshing. Unsplash it is. For production usage, 5000 request per hour is enough (I think). All I need to register as developer to get the API. For demo app, you will only get 50 request per hour. To get unsplash working on my app, I discover an unofficial Unsplash API library for Android (https://github.com/KeenenCharles/AndroidUnplash).

I randomized the query (android wallpaper, iphone wallpaper, wallpaper) to get random photo which is portrait mode each time when the user open up the app. This will eliminate (workaround) user get the same wallpaper. The simple part is almost done, but the process to verify the app is take longer than I've expected. Unsplash state that it will take up to 10 days to verify. Mine took 8 days plus almost 5 days to get back and forth email with the support. Luckily on 1st Feb 2019, unsplash approved my app and it's now in production environment.

I've uploaded my apk to production release in the play store on the same day. Here are some of the screenshot using Shotsnapp

Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 4
Screenshot 5

My app Advice on Play Store

Top comments (1)

Collapse
 
sloan profile image
Sloan the DEV Moderator

Hi there, this post might fit better as a DEV Listing. It’s a dedicated area of the platform where community members and organizations are encouraged to publish information related to events, products, services, job listings, and everything in between.