AsyncTask implementation framework – to be independent from Activity –

Continuing from AsyncTask usage summary. Interest is how to establish independence between Activity and AsyncTask? The answer is well summarized in the article, “Android AsyncTask はバックグラウンドの処理に集中すべし!”. I will just translate and re-summarize this article. 3 ways will be introduced.  Advance – implementation framework of AsyncTask A. Define as inner class of Activity Most intuitive, easy and faster way […]

Continue reading →

Spinner Fragment: show loading progress bar
– Android TV app hands on Tutorial Appendix A

In the Appendix of this Tutorial, I will introduce useful Android common library/function. These are usually applicable not only for Android TV, but also for Android phone/tablet device as well.   Spinner Fragment – show loading progress bar While user is downloading big contents from web, you might want to show progress bar to notify user […]

Continue reading →

Refactoring source code construction
– Android TV app hands on Tutorial 14

Refactoring I have explained Android TV specific UI implementations (sample source code referenced from Android TV sample application) through this tutorial. So I conclude this project by reorganizing the source code files. I did refactoring based on the role of each classes, and finished with below structure. com.corochann.androidtvapptutorial common – common functions. This module has no dependency […]

Continue reading →

Build executable file with Android NDK after Lollipop (Android API 21)

I’ll introduce more functionality of Android NDK continuing from Android NDK set up introduction. Android NDK is not only a tool to build up .so library to call through JNI, but it is also possible to build executable file itself. It is achieved by just changing Android.mk configuration.  Below is example implementation to build hello-exe […]

Continue reading →

Starting Android NDK is easy!

Android NDK Develop environment set up summary Usually Android application is developed by Java, but you can use C/C++ source code together with Android NDK (Android Native Development Kit). It provides us a opportunity to re-use/integrate existing C source code as well. Below is summary for the steps how to start working with Android NDK. Step1. Download installer from […]

Continue reading →

Android Studio Live Templates Introduction

How to use Live Templates Go to [File] → [Setting] → [Live Templates], already registered live templates are shown. We can check the Abbreviation, Description and Template text here. During the coding, typing “Abbreviation”(shorcut command) followed by pressing [Tab], “Template text” will be expanded. Live templates are very useful to eliminate to write the code […]

Continue reading →

In-app Search function implementation
– Android TV app hands on Tutorial 13

Search function implementation The usage of SearchFragment of Leanback support library and UI related implementation are explained in previous chapter. In this chapter, I will explain (background) search function logic. Most of the implementation in this chapter is just a explanation of googlesamples. In-app search algorithm Search algorithm is implemented in loadRows method, especially the […]

Continue reading →

AsyncTask usage summary

Overview AsyncTask is useful when you are working on UI (main) thread, and want to do some (maybe long) background process, and want to get callback after the background process finishes. For example, consider the case when you want to update UI of Activity according to the result of internet access. You must execute URLconnection in background […]

Continue reading →