Analysis and solution of online Finalize() timeout problem

For a long time in the past, the online availability rate of the Android app has remained at around XX.X%. In recent months, a large number of TimeoutExceptions have been found in the statistics. In order to affect the number of users, XX of TopXX’s crashes are caused by similar problems.

From the statistics of the problem, more than XX% appear in the OPPO R9 series system, XX% occur in the background, the vast majority occurred before and after the application started X minutes, Android system version X.X and X.X accounted for And more than XX%, the proportion of non-Root users exceeds XX%. Based on the various data, this is a problem that occurs in a specific model/system, which is less sensible to users and has a higher incidence rate.

The user experience is a vital part of the application, so taking the time to analyze and solve the problem.

Read More

Solution of Jitter Problem in AppbarLayout Sliding Process

The need for an iteration is to achieve a hover effect on the page, considering that CoordinatorLayout has passed a number of versions of BugFix, it should be relatively stable. So try to implement hover directly with CoordinatorLayout+AppBarLayout. As the type of head layout continues to increase, the length gradually becomes larger, so the problem is unexpectedly discovered during the sliding process. Since the official is not repaired, the problem can only be repaired using the custom Behavior.

Read More

Use IFTTT's Webhook to Implement Message Reminders

After writing the automatic check-in script, I also hope to receive the push message after each script run. I tried to send emails with 163 mailboxes, but it always triggered the anti-spam mechanism to be blocked, whether it was to change keywords or set recipients. So, look for it, use IFTTT to do the push.

Read More

String Segmentation Matching for Dynamic Programming Problems

The question is as follows: There is an encrypted string s[1....n], and there is a codebook that records the original-ciphertext data of the key-value type. If the time of the table is Invariant, the result of the lookup table is treated as f(w), where w is a string, if it matches, it returns f(w), if it does not match, it returns null, try dynamic programming to determine the string. Whether s[1...n] can be decrypted.

Read More

Install Zsh on the Raspberry Pi

The previous article said that the Raspberry Pi, which has been idle for more than a year, has been built to build a running environment, so how can we face such an ugly Bash, of course, it must be replaced by zsh.

Read More

Use Raspberry Pi to Hang Up Live and Auto Check-in

Android emulator and Docker on Windows can’t be used at the same time. I want to use Raspberry Pi to set up a development environment. I just watched the live broadcast recently, so maybe running an RTMP live broadcast on the Raspberry Pi is a good idea.

Read More

How to Use Printer by Android Programmable

We usually connect the printer to Windows using USB and Wifi, but for some models, the system also needs to install the printer driver. Calling the printer on Android is slightly different.

Before Android 4.4, a third-party solution was needed to implement the printing function, or a protocol for communicating with the printer was implemented. After 4.4, Android introduced the Print class as a printing tool class, such as PrintHelper for printing. Bitmap, PrintPdfDocument to print the document.

Read More

Using Unisound Realization Android Voice Broadcast

It is relatively easy to implement voice broadcast on Android. The first reaction is to use the TTS that comes with the system. However, the support for Chinese is not good. Secondly, it is inconvenient to customize the voice effect. Third-party voice broadcast solutions are a natural choice.

There are many third-party voice broadcast programs, such as Xunfei, Baidu, and Unisound. This article uses offline broadcast programs. Xunfei’s offline charges are not low. Baidu is the default network, so only Unisound is optional.

Unisound’s vision into the public should be at the launch of the Smartisan. Like every open platform, you must first register as a developer.

Read More

Get the Current Public IP Address

I saw someone sharing an open source Py library to get the current IP on v2ex, Which remind me that the proxy crawler I wrote before was verified by Taobao’s API. There are concurrency restrictions, and maybe I can change it to a better way.

Read More