You might have built Terms of Service page, or Privacy Notes, or Help Center screen in your Android app using the article I wrote a while ago

however you just remembered your company has also an iOS app and now you need to build the same feature there.

Here’s what we’re going to build

You might already come across other popular articles on that topic, and perhaps know two possible approaches to take:

1) UILabel
2) UITextView

Handling clicks on text with UITextView approach is a bit simple and UITextView itself has a more complex API so going UILabel way would be slightly easier.

So here’s…


There’s A LOT of mobile apps these days that do almost all the possible functions you might ever need in your life, however, under the hood the most common operation all the apps do consists of the following steps:

  1. Make network request
  2. Massage the data that came with request
  3. Display some UI with the data from step 2)

I opened my phone to verify that assumption and couldn’t find a single app that works purely offline (well, the only one that sort of does is Photos app but only because I don’t backup my photos in iCloud).

So if you…


If you came across this article, you most likely found several more before discovered mine and possibly even tried to implement Apple’s JWT-based auth as per their official docs.

I decided to write another one because I was one of the many other developers (1, 2 etc.) who spent hours struggling with 401 http response.

A short preface. I was playing around with Music API and I wanted to try out Apple music API. In order to do that I needed to authenticate all my requests with a developer token which is basically two json objects (header and body) encrypted…


You probably used apps which have a TextView with a link to a Terms of Service page, or Privacy Notes, or Help Center, or anything else that is available on web but isn’t built into the app.

Google Chrome


When does a mobile app become enterprise?

When it contains thousands of lines of business logic?
Or when it brings good profit?

I stick to the idea that solid test coverage makes a mobile app enterprise. At the company where I work, developers spend no less efforts writing tests than writing business logic.

Couple of my colleagues wrote articles on MVVM which I think would be a great read and a pre-requisite to this article which focuses on some testing strategies you could follow when writing your Android app.

Here’s the articles by the way:

Let’s start with an example…


¯\_(ツ)_/¯

This article is inspired by the following great article that many Android devs have likely seen before:

Disclaimer: this is a real story happened to me but it might be different for other people.

Let’s say you follow that article step by step and create a view that has default(collapsed) and expanded states.


If you haven’t read my previous post about setting up the Room I highly recommend to check it out first. Also repo with examples is https://github.com/iwuvhugs/Choice

If you’ve done steps from that article you have app with one table and couple queries aka classic-new-library-tutorial-app. However in real life you probably need more than one entity in your app.

Assume you already have app with a single questions table. Let’s add second table for answers . questions and answers will have one-to-many relation.

import android.arch.persistence.room.ColumnInfo
import android.arch.persistence.room.Entity
import android.arch.persistence.room.ForeignKey
import android.arch.persistence.room.PrimaryKey

@Entity(tableName = "answer",
foreignKeys = arrayOf(ForeignKey(entity =…


I’d like to begin with a short preface about me. I am an Android developer for almost 3 years and during that time I architected database layer literally 0 times.

In my very first project there were no need for a database. We had a short term persistence layer made with SharedPreferences. One reason of it was that we needed to store 20 last searches and it was fine if we lose data on migration. We actually never lose data because it was very simple. Another reason was that I did not know how to work with databases in…


It happens that in my current project I wanted to implement the execution of shell-scripts directly from the code. In order to get in the swing of things, I suggest you read this article: Shell-scripting environment Android (in Russian but code examples pretty clear). The author of the article describes well the features of Shell-language, but I needed to execute both scripts and Java methods in the same code. Android_x86 was used as development environment. However, you can use the rooted phone (root access required). Scripts execution from Java is fairly simple:

/** 
* Run scripts in separate thread…


Так сложилось, что в моём текущем проекте необходимо было реализовать выполнение shell-скриптов прямиком из кода. Для того, чтобы войти в курс дела, советую вам прочитать эту статью: Shell-скриптинг в среде Android В ней очень хорошо описаны возможности языка Shell, однако мне помимо самих скриптов нужно было выполнять методы Java. В процессе разработки был использован образ Android_x86. Однако можно использовать рутованный телефон (наличие прав суперпользователя обязательно). Сами скрипты из Java выполняются довольно просто:

/** 
* Метод выполняет скрипты shell в отдельном потоке.
*
* @param command shell скрипт.
*/
public void runCommand(final String command) {
// Чтобы не…

Kirill Suslov

Mobile developer, snowboarder, dog lover

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