ANDROID DATABASE & FILES

Learn how to export tables from Room DB as CSV files on Android device. No Storage permission required.

I was showing how to create a basic Room database in my previous post. This time I’m taking it further by introducing an Export to CSV file option to the project. I believe it’s an often requirement and surely a convenient method — to have some some sort of export capability of the app’s database.

Below you can see the screenshots from movies-room GitHub project:


https://pl.pinterest.com/pin/676314069016386839/

Android UI tests

Learn how to write Android UI tests for a various components from ground up

In this tutorial I will show you how to write UI tests for a small Android app with two activities, simulating list — details flow. One of the activities shows a list of groceries and another one — enables to write a note and clear it. Both of the activities have menu items and the second one shows a dialog and a toast. I tried to use various views and components in order to showcase Espresso and Barista capabilities. I generally tried to not re-invent the wheel, but use helper methods and wrappers whenever I could.

To give a bit…


Observing myself and those around me, I’ve noticed how often we ask ourselves “What is the best thing to do?” or “What should I do to make everybody happy?”. While these questions seem pretty harmless to ask, they carry a certain thread.

First of all, they are rather vague, don’t you find? Among all of the possibilities and things you and your loved ones like, somehow you have to choose the only one and make sure it’s the correct one. Doesn’t it sound overly complicated and even impossible?

To be fair, I tried doing this some time ago and it was a very overwhelming experience. I basically, spent months trying to think of the best scenario, to foresee all of the nuances and choose this one narrow path of mine. Guess what? Once I tried walking on that path, I understood that…


Look Counter app

In 2016 (which seems like a whole eternity from now :), I wrote an Android app called Look Counter for counting how many times you have switched the screen on, as well as unlocked it. Up until recently I haven’t updated it. The app used such libs as greenDAO , ButterKnife , GoogleAnalytics, and RecyclerView. After the update, only the last one remained :)

I’ve decided to completely re-write Look Counter, using the modern tools. The first step was to update all of the dependencies and set project’s target API to 27. It’s a good idea to set yours to…


http://iliketowastemytime.com/2013/02/09/daily-wallpaper-forest-scenery

Android development can be (and usually is) much easier and satisfying with Kotlin, compared to Java. But it’s also quite different. Lots of things, like predefined nullability (or lack of it), no static as we know it, extension and top-level functions are there to be used in our favor. No wonder that it may be confusing what approach to choose, especially when the same thing can be done in different ways.

Today I’m gonna present you a better way of initializing and using SharedPreferences in your Kotlin app. No more repeating code with initialization in every place you want to…


Unsplash — https://unsplash.com/photos/2JIvboGLeho

ANDROID DATABASE

Simple tutorial on how to use Room DB together with ViewModel, LiveData and coroutines.

With Android Architecture Components, along with handling lifecycle events, realtime data updates in UI (ViewModel with LiveData) and pagination of loaded data (Paging), comes Room — small, yet powerful SQLite ORM. In this post I’m gonna demonstrate its core capabilities on an example Android application, written in Kotlin.

Remember those times implementing SQLiteOpenHelper and checking SQL queries in run-time? Good news is that you don’t have to do it anymore! Room performs compile-time checks on your SQL queries and you don’t have to write any SQLite code which is not in a direct relation with your data queries. …


Recently I’ve read this amazing book that a friend of mine was eagerly recommending — “Lean in: Women, work, and the will to lead” by Sheryl Sandberg — an activist, technology executive and the COO of Facebook. In her book Sheryl talks about equality, how we sometimes don’t even notice situations where women retreat instead of leaning in. The stereotypes of a working mom, who neglects her kids or a successful male who doesn’t know how to take care of house, can be difficult to seize, but are definitely worth of eliminating from our community.

Every human being should be…


Since the introduction of AppBar in 2015, Android developers have spent lots of time styling and modifying it, making beautiful and unique apps. The ways of modifying Toolbar and flexible area beneath it are quite impressive. Yet, still the entry threshold is quite high for those who want to make their first steps in Material design world.

Partly, this is because of an incomplete documentation and the lack of diverse examples. I, myself struggled to make the layout I wanted and as easy as it sounds — to make it scroll the way I want to. …


Krótkie opowiadanie z perspektywy dwóch różnych kobiet.

Źródło: https://seamus-design.deviantart.com/art/Cottage-in-the-woods-579276043

Jachna
Zapowiadał się kolejny nieciekawy poranek, przerywany sporadycznymi wizytami starców i zbieraniem ziół w lesie. Pewnie znowu przyjdą z prośbą o ciepło i brak burz, po raz setny odpowiem że to nie do mnie, oni znowu nie uwierzą i będą błagać, aż w końcu zgodzę się wyszeptać, zostawią mi kurę czy gorzałkę i sobie pójdą, uradowani. Ot, zwykłe prośby i groźby.

Ile ja jeszcze wytrzymam tą głupotę ludzką? Niby jestem odporna na cudze myśli i opinie, a jednak czuję że marnieje w tej dziurze. Taka doświadczona zielarka jak ja, powinna przysługiwać znanym magom…


Winter of 2014/2015 wasn’t easy for me. Not because it was nasty and cold outside, but because I got sick. It was all of a sudden — one day I was OK and another I end up in a hospital. How so? Well, there was a Christmas party with my colleagues from work and of course there were music and drinks. I haven’t drunk a lot, just a few cocktails with vodka in it. Also, left the party quite early, mainly because a friend of mine wanted to go and I didn’t want to hang out without her. Sounds good…

Tonia Tkachuk

Android Developer. Interested in Kotlin and Flutter. IT girl and mother.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store