How to Share MP3 From my Playstore App

How do i share any mp3 on the downloaded app from playstore that i made?
it just says : file not found
how do i make an app with the all the mp3 avaliable for sharing on whatssap?

Please show your blocks.

i dont know how to put the file block, i cant put it on file extension
i just try sharing the player with the file

try this:


sharing component needs full path:
file:///mnt/sdcard/Makeroid/assets/sound1.mp3 (Companion)
file:///android/asset/sound1.mp3 (APK)

Taifun’s Tools extension: App Inventor Extensions: Tools | Pura Vida Apps

thanks how do i discover the path of where the sounds of the app downloade on playstore are?

the sounds are in the assets file:///android/asset/
see above, I’ve adapted. Where the user shares the sound file is irrelevant.

download aia share_mp3.aia (56.4 KB)
build APK and try …

For testing with Companion:

What I know of you cannot share files located in assets

Only your app has access to this path file:///android_asset/

/Boban

Ok thanks Boban, try this share_mp3.aia (87.6 KB) or this share_mp3.apk (4.2 MB)

Thanks Body and Boban, i used your blocks and the extensions but im reciving this error when trying to download the apk
Invoking AAPT
YAIL compiler - AAPT execution failed.

Can you show us the entire error code

/Boban

Kodular is unable to compile this project.
The compiler error output was
________Preparing application icon
________Creating animation xml
________Creating fragment xml
________Creating listview xml in res/layout/…
________Creating listview xml in res/layout-v21/…
________Creating xml in res/drawable/…
________Creating splash png in res/drawable/…
________Creating colors xml
________Creating strings xml
________Creating styles xml
________Creating drawables xml v21
________Checking for firebase
________Creating provider_path xml
________Generating manifest file
________Attaching native libraries
________Attaching Android Archive (AAR) libraries
________Attaching component assets
________Invoking AAPT
YAIL compiler - AAPT execution failed.
.

Its happening in other apps that used to Work too, I searched he community and didn’t repeated any asset name , tested all mp3 filed and they are playing

There are several things that can cause this error

bild

How big is your aia
Try clearing your web cache
Sometimes when extension is not uninstalled correctly
Improper files in assets or structure

/Boban

The first question is, if my APK (share_mp3.aia) will be built / compiled and does my APK work?
I thinks so, so it’s up to your aia (aia too big or too many files in the assets).

Anke

Btw, I chose an app-specific directory because it does not require READ / WRITE_EXTERNAL_STORAGE permissions.

1 Like

i have 2 pages with 70 sounds in total, i was able to download the apk but now im reciving that error , aia is 4,74mb, i have no extensions, cant download the apk in any deviceteste.aia (4.7 MB)

Remove package name and try again

/Boban

1 Like

I have made some adjustments for you in the designer on Screen1 (verticalScrollArr) and in the blocks:

teste2.aia (4.8 MB)

As I said this app does not need READ/WRITE_EXTERNAL_STORAGE permissions. So build the APK (teste2.apk), open it and deny permission and see that it works anyway. But the Sharing component enforces these permissions (see here: ExoPlayer source only from assets or URI). So if you do not want these permissions to be requested you have to remove them from the Manifest before building the APK.

Anke

1 Like

thanks anke and boban, i can download the apk now, i just neet to multiply it like that right?

There is an easier way, use when any button click or long click

bild

/Boban

But i want to send one different file for each button