Android User Help

How can I connect a cassette player to my Android device to record cassette tapes?

I have a OnePlus phone and a cassette player with a headphone jack. I can connect the headphone jack to the USB on my android device using an adapter. Now how can I capture and record this sound from my android device?