Error in creating extension

Yes.

But here you will have to implement ActivityResultListener to get callback.
For example: