How to record Android device’s screen on Android version below 4.4 (KitKat)

This only work in KitKat and via ADB only. This does not work below Kitkat. To start recording your device’s screen, run the following command: adb shell screenrecord /sdcard/example.mp4, This command will start recording your device’s screen using the default settings and save the resulting video to a file at /sdcard/example.mp4 file on your device. When you’re … Read more

How to set the text color of TextView in code?

You should use: You can use various functions from the Color class to get the same effect of course. Color.parseColor (Manual) (like LEX uses)text.setTextColor(Color.parseColor(“#FFFFFF”)); Color.rgb and Color.argb (Manual rgb) (Manual argb) (like Ganapathy uses)holder.text.setTextColor(Color.rgb(200,0,0)); holder.text.setTextColor(Color.argb(0,200,0,0)); And of course, if you want to define your color in an XML file, you can do this:<color name=”errorColor”>#f00</color> because the getColor() function is deprecated1, you need to use it like … Read more

Android Emulator Error Message: “PANIC: Missing emulator engine program for ‘x86’ CPUS.”

If you are using macOS, add both Android SDK emulator and tools directories to the path: Step 1: In my case the order was important, first emulator and then tools. Step 2: Reload you .bash_profile Or .bashrc depending on OS Step 3: Get list of emulators available: $emulator -list-avds Step 4: Launch emulator from the command line and Replace avd with the name of your emulator $emulator @avd Don’t forget to add the @ symbol. This … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)