Android Question Android to PC media keys remote control

Paulo Rosa

Member
Licensed User
Hi all,

I need to build an Android app that uses Bluetooth for controlling a PC app. The Android app should allow me to control the PC media keys (or better simulate their actions): volume control, play/pause, next track, previous track. In other words, I want to use my Android phone as a media remote control for my PC.

I think I know my way to build the Android app, or at least I know I can search for examples here in the forum.

But what about the PC app? I thought of building a B4J app that receives data from my Android app via Bluetooth. But would my B4J app be able to control the PC media keys?

In this old post Erel stated that B4J apps can't do that: https://www.b4x.com/android/forum/threads/send-key-control-media-player-and-pc-functions.49249/

Is that information still correct?

Regards,
 

walterf25

Expert
Licensed User
Longtime User
Hi all,

I need to build an Android app that uses Bluetooth for controlling a PC app. The Android app should allow me to control the PC media keys (or better simulate their actions): volume control, play/pause, next track, previous track. In other words, I want to use my Android phone as a media remote control for my PC.

I think I know my way to build the Android app, or at least I know I can search for examples here in the forum.

But what about the PC app? I thought of building a B4J app that receives data from my Android app via Bluetooth. But would my B4J app be able to control the PC media keys?

In this old post Erel stated that B4J apps can't do that: https://www.b4x.com/android/forum/threads/send-key-control-media-player-and-pc-functions.49249/

Is that information still correct?

Regards,
If you are creating your own B4J App i don't see a reason why you wouldn't be able to do it.

At the very least, you can wrap this API into a library and create your own media Player
https://examples.javacodegeeks.com/desktop-java/javafx/javafx-media-api/

Regards,
Walter
 
Upvote 0
Top