Because heart activity is electrical in nature, it is unlikely that you will discover the means to generate the results you seek.
I found an instructable for creating a monitor using an oscilloscope and contact electrodes, but before I could build one, I discovered a product called Kardia, now called KardiaMobile.
I have the iOS version, but there is an Android version as well.
Additionally, it records only 30 seconds of heart activity. The above linked site shows one placing one finger of each hand on the external sensor, but that also allows muscle impulses from the arms to be included in the recording. I follow the recommended method of placing the contacts against my chest to achieve more consistent and cleaner traces.
The recorded beats per minute are the electrically interpreted count, rather than the ones that would be heard through a stethoscope. The irregularity can be seen by the uneven spacing of the peaks as well as a few that appear to be malformed or missing.
I've added a "normal" reading, although my resting pulse is usually in the 70s. I'm not sure why it's high here, but the pulse recording shows regular spacing and uniform heights. The beginning of the traces may be irregular due to software factors involved in calibration.
If you are willing to modify your requirements slightly, this device and software may work for you.