Ignore battery optimizations

I have read this article:

And I done as it was described. My blocks are on the picture here:

But when I run app and click that, nothig happens.

What I am doing wrong?

Everything is OK in this program. Try build again to another project

I done that in another project and it is the same. Nothing happens. I need to remove app from battery optimization list in android.