Before we start this job, let’s check how my laptop looks. Here are some factors of my M1 MacBook Pro 2020

  • OS version : macOS Monterey 12.1 Beta (21C5021h)
  • Chipset: Apple M1
  • Memory size: 16 GB
Read more »

Android Emulator on Apple M1

credit: Alexander Ziskind

New Apple M1

As you know, the Android emulator can’t run on the Apple M1 with the HAXM and VT-x, which means the performance would be affected, and a better option is to use the physical device. So, when you try to install a new android virtual device (the emulator). You will see this screen:
Not Support Screen

You can only select arm64 images in the Other Images category.

ARM64 Image

So, this is not an issue even we choose to use ARM64 images. The point is that when you launch the emulator, you always see the emulator status is offline. The reason why it’s always offline is that the image under the system-images folder is damaged, and you need to replace it with a workable one.

How to solve?

Try to download one of these two images [2], [3]. After downloading one of those two images, unzip the file and replace the folder arm64-v8a under ~/Library/Android/SDK/system-images/android-S (if you choose to install Android S). Then restart the emulator. You can see the emulator should be back online again.


  1. Android Studio Release Updates: Android Emulator Apple Silicon Preview
  2. Google Play ARM 64 v8a System Image (revision: 2)
  3. Google APIs ARM 64 v8a System Image (revision: 2)


If you start doing the Android platform’s customized view components, you may need to draw something special in your Canvas object. It’s very straightforward to draw a circle, a rectangle, an arc, etc. You probably would ask one question:

What about drawing a string on your canvas?

Well, that’s a good question. Let’s see how to draw a string fundamentally.

Read more »

Introduction of the Chrome Custom Tabs

Why Chrome Custom Tabs?

Android developers might encounter a situation: the user needs to open a web link in the App, for example, the terms of service page. We might either open a browser using an intention with a view action or using the WebView to display.

Read more »



One day my lovely wife invited to watch youtube videos together. Unfortunately, we don’t have a large screen nor a big TV to watch a video comfortably. In the beginning, we tried to view that on our personal laptop, respectively. To be honest, this is not a good idea. We don’t even know which part we watched in each own notebook. Finally, I remember we might be able to connect two audio outputs at the same time. In this way, we can enjoy together on one laptop.

Read more »

An API gateway is a crucial component for web service that provides several functionalities to enhance our web service. Let’s see what it is and what use cases it provides.

Read more »


Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.

Read more »


Design a logger system that receives the stream of messages along with its timestamps; each message should be printed if and only if it is not printed in the last 10 seconds.

Given a message and a timestamp (in seconds granularity), return true if the message should be printed in the given timestamp; otherwise, it returns false.

It is possible that several messages arrive roughly at the same time.

Read more »