Langsung ke konten utama

Postingan

Menampilkan postingan dengan label API

Image loading with Glide

Image loading seems like an easy task at the first glance but as every task, it has its' own caveats. First of all, you probably want to do this asynchronously because you don't want to flood your main thread with that kind of tasks. Then, you want to cache images so you don't load them every time your activity of fragment resumes. You need to handle error cases when the network is not available or server is sending you garbage or doesn't send anything at all. If you don't do this it will definitely harm the user-experience. After all, you probably need to do some pre-processing steps before showing the image to the user such as cropping, resizing, reversing etc. Also, it would be convenient to have an easy way to set an image in an ImageView. You may ask: "Why do you think that you know what I need and want?". The answer is that you're not alone. Android developers already made tons of apps that use pictures from the network. And what happens when man...

Introduction to Firebase Database for Android

I've already written a post about Firebase and its' features but features highlighted in the post are additional to the core functionality of Firebase. What is this core functionality? Well, this is the thing that Firebase started from. It's Realtime Database . A real-time database is, basically, the database that can effectively store dynamic data. By dynamic, I mean data that is constantly changing for example stocks prices. Firebase Database So Firebase has its' own built-in real-time database which you can use as a backend for your app. Let's consider the structure of this database. First of all, it's worth to mention that this database is not relational and doesn't use tables as you might expect. It uses JavaScript Object Notation (JSON)  to store the data so it's kinda "object-oriented" database.  I think that this it an advantage at least for developers because JSON, in my opinion, is easier to understand than relational tables if you...

Benefits of Awareness

Today apps are more and more bound to the users context and developers seek for the way to provide a unique experience for each and every user. One of the first apps that were designed to do so was Google Now a Google's smart mobile assistant that was meant to provide the user with information like weather, traffic, flight delays even before the user needs it. To make this kind of apps, you need to be aware of user context. What is around him? Is it raining? What is he doing? To answer these questions, you need to use sensors, a bunch of APIs and do it all in the background. It means that your app will drain the battery and affect the system health even if it's not accessed at the moment. Bad influence on the battery life can be the cause of your app deletion from user's smartphone. But these battery and performance optimizations can be a cause of pain for the developer. You need to develop the main idea of your app to make it clear and straight. And here comes Aware...

Why I'm charmed by FireBase

What is Firebase Firebase is a cloud service provider for mobile and web developers. It was originated as real-time database service in 2011 and still it's the crucial characteristic of it. But with it, Firebase offers the huge amount of features. Like built in Analytics, App Indexing, Hosting, Authentication, brand new Dynamic Links, Notification handling, Crash Reporting, and AdMob. Most of these are totally free. There also paid plan  featuring testing and Google Cloud Platform integration. These features are new and were presented at Google I/O 2016, for me it was one of the most exciting parts of the keynote. I didn't put it in My Top 8 Announcements From Google I/O 2016 , though. Because I think it worth to write a separate post about. What I like the most about it is that it gathers almost all backend that you need for your mobile or web app in one place and manages everything for you. You don't need to connect your app with Google Analytics, AdMob, a real-tim...