How to prevent screen capturing in Android

Prevent screen capturing is way for saving your content. Android SDK have special flag for it. https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE Just declare it in your Activity like this:

And user will see next message when try make screenshot:

How to fix “undefined reference to ‘__atomic_exchange_4”

When I built native library for LatinIME I’ve got next error: undefined reference to ‘__atomic_exchange_4 Full stacktrace:

To avoid it open Android.mk file and add next string:

Build native libs for LatinIME. Error: base class ‘class latinime::NgramListener’ should be explicitly initialized in the copy constructor [-Werror=extra]

I working on LatinIME Android Keyboard keyboard. I’ve got source from Google repo. Here is structure: java – contains java code native – jni code. When I try to build native I receive next error:

Full stacktrace:

To avoid it I’ve edited Android.mk in jni dir and replace: Read more…

How to flash Nexus 5 Hammerhead

Hi Guys, Please do the next instructions with your own risk. Download stock Image from https://developers.google.com/android/nexus/images I’ve downloaded 6.0.1 (MOB31E) Inzip Image Unlock the device’s bootloader

or, for older devices, run the next:

Execute the flash-all script from ZIP. Start the device in fastboot mode again. Lock device bootloader:

or, Read more…

Android Loop Tabs Sample

Here is sample for loop tabs in Android. Video with sample application in action Lets show how it works. 1. I have Tab enum which describe Tab element. Also you can handle tab state. I don’t do it in this sample.

2. Project has View for tabs which extended Read more…