Android App - How to save a bitmap drawing on canvas as image? Check code?
I tried to use the following codes to Draw on canvas Save the canvas on Image Problem - When I try to save the image, it shows a null pointer error and nothing is saved. Please help me to find the problem with the code or suggest me an alternative, which does excatly the same. Thanks in advance. Code to draw on canvas: package com.example.draw2; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.util.AttributeSet; import android.view