I'm working on an Android Code Labs challenge (the first one) , that requires you to take a screen shot of an activity and enailing it to someone.
There's only one activity and it displays "Hello World".
So I decided to use API class PixelCopy - specifically the method:
PixelCopy.request(Window source, Bitmap dest, PixelCopy.OnPixelCopyFinishedListener listener, Handler listenerThread)
I understand that PixelCopy.OnPixelCopyFinishedListener provides this callback method: onPixelCopyFinished(int copyResult) where int copyResult is PixelCopy.SUCCESS etc if the copy operation was successful.
I'm getting stuck because I don't understand how I should pass PixelCopy.OnPixelCopyFinishedListener PixelCopy.request(). I mean what does the variable listener refer to ? what is its type ? what should listener be ?)
I know that there is an easier way and that it to use API class Screenshot, Screenshot.capture() but I am a glutton for punishment.
The code (as far as I've got with it) is below:
posted 1 month ago
I was asking a muddled question.
I have thoroughly studied the official oracle tutorial on nested classes and nested static classes and now I understand.
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!