I\'ve searched a lot about taking screenshot of my OpenGL object on Android and come up with this solution. It worked great but in my case I have camera view and opengl view
The solution you mentioned is using a Bitmap.Config.RGB_565 which doesn't support alpha channels.
Bitmap.Config.RGB_565
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
Instead you should use Bitmap.Config.ARGB_8888 or Bitmap.Config.ARGB_4444.
Bitmap.Config.ARGB_8888
Bitmap.Config.ARGB_4444