Profile cover photo
Profile photo
Jiahao Liu
59 followers
59 followers
About
Jiahao's posts

Post has attachment
Robolectric - Figure out the error trace when the tests gets stack
Running robolectric helps to do the unit testing on Android faster, but there were several cases when it runs and it seems to get stuck on some point. To know what is happening, do the follow: 1. First try, running it on you terminal 1.1 Copy the execution ...

Post has attachment
Google Maps - Get the center point
Now a day we have apps like Uber or Careem which has a fix point to the center of the map. To get the latitude and longitude of the center of the map, do the follow: // Get the center of the map and update it as the camera changes mGoogleMap.setOnCameraChan...

Post has attachment
Android Alpha Table
In Android the colour could be set using the typical HEX colours, where the first two characters are the Red colour, the next two are the Green colour and the next two are the Blue colour (RGB). Beside this, optionally the user can specify the alpha value, ...

Post has attachment
Enabling logs on HuaWei Devices
It seems that HuaWei devices have disabled the logs by default. To see the logs, you got to do the follow: 1. Open dial app 2. Enter the follow number ##2846579## There is not need to call. A hidden menu will appear as ProjectMenu 3. Click on Background...

Post has attachment
Android Public Key Pinning - DroidCon Dubai 2016


Post has attachment
Public Key Pinning in Android
Public Key Pinning - Jiahaoliuliu - DroidCon2016 by JiahaoLiuLiu

Post has attachment
Git - Undo previous commit and push
If you have commited and pushed a change to the repository and you want to undo those changes, do the follow: 1. Open the terminal 2. Type git log This will give you a list of commits, with the text and the hash code 3. Then type git revert --no-commit HASH...

Post has attachment
Playing with Android bootloaders - Some basic concepts learned
So, I was playing with the Android bootloaders for Asus ZenFone 2 and this are some key concepts. Step 1 - Go to Fast boot mode This is the basic and first step where we can go to the boot loader. 1.1 Turn on the phone by holding the power button and volume...

Post has attachment
Simple command to record the screen as video
Simple command to record the screen as video. For Android 4.4+ adb shell screenrecord /sdcard/demo.mp4 Source Cnet - How to record your screen on Android 4.4 KitKat

Post has attachment
Android: Enabling logs on Snowplow
As the tracking solutions in mobile is increasing, Snowplow could be a good solution to centralize the list of trackers. By default, the logs on Snowplow is disabled. To enabled, use the follow code: // Ask Logger level of Snowplow to log data
com.s...
Wait while more posts are being loaded