I guess you want to apply an electronic signature on a document using a user's handwriting with a pen. As has said @mkl, 'digital signature' concept is usually applied when using digital certificates and cryptography.
Handwritten electronic signature requirements
People tend to think that the handwritten signature consists of embedding an image, but so that your system has a minimum legal value in case of litigation you will need:
R1 - ensure the identity of the signer
R2 - Uniquely attach signature and document
R3 - protect integrity of document and signature
More or less these are the characteristics of digital signatures.
Handwritten signature on Android
The process on android should be like this:
R2) capture the user graph including biometrics(x,y,time,pressure) using a Canvas. Embed image and biometrics data into document using PDFBox or itext (client or server side)
R1) included biometric data in previous step allows a potential analysis of signature by an expert
R3) I suggest to apply a timestamp over document and signature evidences to protect the integrity and ensure the time of signature. Both itext and PDFBox support it
If you do not need legal value, then apply only the drawing part. The quality of your signature will be determined by the devices characteristics. For example a specific signature tablet can provide also the orientation of the pen
Android links
You will find similar links for itext. Select the most suitable for your use case and whether you want to execute on Android or in the server side