0

I use JNI way, composer -> captureScreen(...) to capture final surfaceflinger composed screen, like this sample in source code.

and build success on android 4.1, but there are error happened at runtime: the captureScreen(...) returns err = 1, and heap = null.

I googled this link is the same fail, still no answer.

Matthias Robbers
  • 15,689
  • 6
  • 63
  • 73
Nearo
  • 1

1 Answers1

0

OK! I got the answer... the err = 1 means PERMISSION_DENIED = 1 in native code, the root cause is after android 4.0 screenshot consider APP's permission , explained here in Chinese, and here is the detail to work

thanks! B.R.

Nearo
  • 1