Controll an android phone with Arduino

Hi everyone !

I'm currently trying to make a 3D-printed remote controller to manage the music on my phone (android).
I want the basics : play/pause, volume up/down, previous/next.

Does anyone know if it's possible to achieve such thing without coding a "receiver" app on my phone ? Like sending a request that will trigger the "play" function of the phone (just like a pair of headphones or earbuds would)

Thanks !

without coding a "receiver" app on my phone

No. The Arduino knows nothing about the external world, including Android phones.

I see :thinking: do you have any idea about how regular bluetooth speakers can interact with a phone for exemple ?

Like what's the difference between the bluetooth connection of an esp32 and a pair of headphones ?

An Arduino can send data to an Android phone using BLE (not the same as Bluetooth), and an Android app could be written to take action based on the data.

Example: https://create.arduino.cc/projecthub/dalbaugh/how-to-use-ble-to-connect-arduino-to-an-android-studio-app-163339

I think Bluetooth exposes some generic commands that allow you to control apps on a phone. This is how the "play" or "pause" buttons on your vehicle control let's say a music player on your phone. The fact that the app can be anything such as YouTube or Spotify tells me its generic.

I think you are right!

Surely there is such a thing already available?

It would be much cheaper/ easier.

No, I'm not going to go and look for it. :roll_eyes:

Welcome

I haven't tried, but it should be possible with an ESP32 and this library : GitHub - T-vK/ESP32-BLE-Keyboard: Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)

1 Like

So normaly, i should be able to controll my phone without coding a receiver app ? If so, i just need more info about how android's bluetooth work :ok_hand:

Yeah, i'm sure someone already did it.
But : 1- if it is sold, then i don't think they'll share their code for free
2- i'd like to design and make my own case (since i have access to several 3d printers)
3- when i searched online with keyword "controll phone with bluetooth request", almost every pages were using "receiver" app while you don't need one with headphones or when in car.

Hence why I come here to see if someone is willing to help :slight_smile:

Thanks, I'll check that !!

If you don't find similar Arduino projects posted on line, that is a good sign that it is not easy or practical.

That leaves the options of doing the research, design, construction and coding yourself, or posting on the Jobs and Paid Consultancy forum section. You may be asked to pay for the help.

Well, this is gonna be fun :ok_hand:

But i'm surprised that no one speaks (or even knows) about that while so many devices work that way

Presumably you are talking about commercial products, which are designed by large corporations that employ professional engineers, and mass produce them for consumers.

They don't give away corporate secrets.

If hobbyists could easily do what you want, it would already have been done and posted on line.

1 Like

Well, the greater part of the reason may be that - as you clearly understand - this function is almost always associated with passing the audio via Bluetooth and while there is an "Audio" forum here which i confess, I have just about never looked at, it is generally accepted that Arduinox are not suitable for any serious audio communication purposes.

(Why? Because microcontrollers in general are not appropriate for real-time audio. PCs long ago devolved audio processing to purpose-built peripherals.)

1 Like

Yeah, makes sense. Well, if i manage to get something to work, i'll be sure to update this post ahah, if not, i'll just go with a "receiver" app i guess

Thanks for your insight !

I've tried the library I linked above and it worked for me

1 Like

Well, i can't wait to try it tomorow (it's 1.52am for me ahah)

I've tried the library @guix proposed and it worked just fine !
Thanks all of you for your insight and help

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.