Bluetooth speaker control from app (mp3 list)

Hello everyone, I'm new and I don't know programming well even though I'm slowly getting closer, I wanted to ask if there is a way to read the contents inside my Bluetooth speaker containing an SD card to be able to start it from an application. I tried some solutions you posted but I can't find a way to access the internal memory of the speaker which I repeat is connected via Bluetooth, specifying that I managed to establish the connection with all permissions. Thank you (Daniele)

Welcome Daniele.

If it is possible, one would need to know the model/brand of the speaker and find out if the memory has a data sheet or published api to access the memory.

Something here might help bluetooth control speaker volume using code - Google Search

thanks Steve for the reply, I read a bit but recently using App inventor I can understand little from the forums with the codes, now I use a RIENOK IPX7 speaker which does not have an app for control, previously I used a MIFA a20 which could check via app but with old versions of Android, I noticed that some of the sounds that the two speakers produce when used are very similar, which makes me think that the manufacturers could also be similar. From the old MIFA speaker application I extracted the manifest code, maybe it's possible to understand something from here. An infinite thank you for your patience (Daniele Ferracci)

<?xml version="1.0" encoding="utf-8"?>

<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="19" />

<uses-permission
    android:name="android.permission.INTERNET" />

<uses-permission
    android:name="android.permission.BLUETOOTH" />

<uses-permission
    android:name="android.permission.BLUETOOTH_ADMIN" />

<uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-permission
    android:name="android.permission.READ_PHONE_STATE" />

<uses-permission
    android:name="android.permission.GET_TASKS" />

<uses-permission
    android:name="android.permission.ACCESS_WIFI_STATE" />

<uses-permission
    android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-permission
    android:name="android.permission.CHANGE_WIFI_STATE" />

<uses-permission
    android:name="android.permission.MANAGE_ACCOUNTS" />

<uses-permission
    android:name="android.permission.GET_ACCOUNTS" />

<uses-permission
    android:name="android.permission.CHANGE_CONFIGURATION" />

<supports-screens
    android:anyDensity="true"
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:resizeable="true" />

<application
    android:theme="@ref/0x0103000d"
    android:label="@ref/0x7f060000"
    android:icon="@ref/0x7f020054"
    android:name="com.seemehere.box.app.MyApplication"
    android:allowBackup="true">

    <activity
        android:theme="@ref/0x01030007"
        android:name="com.seemehere.box.activity.LauncherActivity"
        android:screenOrientation="1">

        <intent-filter>

            <action
                android:name="android.intent.action.MAIN" />

            <category
                android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:theme="@ref/0x01030010"
        android:name="com.mob.tools.MobUIShell"
        android:screenOrientation="1"
        android:configChanges="0x4a0"
        android:windowSoftInputMode="0x12">

        <intent-filter>

            <data
                android:scheme="tencent1104801063" />

            <action
                android:name="android.intent.action.VIEW" />

            <category
                android:name="android.intent.category.BROWSABLE" />

            <category
                android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

    <activity
        android:name="com.seemehere.box.activity.MainActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.DeviceListActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.LightControlActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.AlarmActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.BuildAlarmActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.AboutActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.MusicPlayActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.WelcomeActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.ConnectedActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.IntroductionActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.KeySetActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.SplashActivity"
        android:screenOrientation="1"
        android:configChanges="0x70" />

    <activity
        android:name="com.seemehere.box.activity.SuggestionActivity"
        android:screenOrientation="1"
        android:configChanges="0x70"
        android:windowSoftInputMode="0x12" />

    <receiver
        android:name="com.seemehere.box.receiver.AvrcpReceiver">

        <intent-filter>

            <action
                android:name="android.intent.action.MEDIA_BUTTON" />

            <action
                android:name="android.media.AUDIO_BECOMING_NOISY" />
        </intent-filter>
    </receiver>

    <meta-data
        android:name="UMENG_APPKEY"
        android:value="5652ad2ce0f55a9202004119" />

    <meta-data
        android:name="UMENG_CHANNEL"
        android:value="SeeMeHere" />
</application>

Regardless of the fact that I don't know the device and don't know how to access the speaker's memory card via app, since the targetSdk 33 release on Android 13+, READ_MEDIA_AUDIO should now be requested instead of READ_EXTERNAL_STORAGE permission to access media files such as MP3s.

As soon as this permission is requested via blocks, it is automatically declared in the Manifest. Try it out.

See also here:

2 Likes

Thanks for the reply, I read your posts and compliments a lot, I will try but I was hoping with some example blocks on appinventor it could be resolved, however I will try taking inspiration from the discussion you indicated and I will let you know thanks (Daniele)

This must be a very old version, because targetSdkVersion=19 (Android 4.4, KitKat) was a long time ago. To publish an app to the Play Store, the app must now target at least SDK 33.

1 Like

Perhaps your MIFA a20 only requires a firmware update? It might allow you to control your audio again.

Thanks for the information Steve, I already knew this site but it does not provide the firmware download, each time it takes you to another page of the site without being able to implement the promised update, however the original MIFA application on my xiaomi 11 lite, as soon as I turn it on bluetooth closes because it is an old version (Daniele)

Grazie Anke, the problem with these speakers is that by using an internal memory if you want to scroll through the various music albums (I listen to several) if you don't have an external controller continuously pressing the forward button for each song makes it Christmas :wink: (Daniele)