How do i make a Pocket Speaker for my phone?


I have Arduino Uno, A Speaker, and A Slider Pot. The slider pot shows how much volume should there be. The speaker if from the sound of my phone and I’m going to connect the Arduino to my Phone, and to do that, I need a USB to 3.5mm Jack cable and when I connect, it activates the speaker and the slider pot changes the volume of the sound that comes from the phone. When it’s disconnected, it is going to shut itself down. It’s like Bluetooth, but I’m not using a Bluetooth chip. So, how can i do that?