I am using a Player to play an .mp3 file. It works on my phone's Companion app but not on my computer's BlueStacks 5 emulator. I used the exact same code for both tries. Is that a problem with App Inventor or with BlueStacks?
P.S. The same also happens with .wmv files, just in reverse (can play on BlueStacks, can't play on phone).
Anke
May 18, 2024, 8:56am
2
Show your (relevant) blocks.
Enable READ
permission. https://support.bluestacks.com/hc/en-us/articles/360062395071-How-to-enable-disable-app-permissions-in-BlueStacks-5
WMV
files are special (outdated) Windows video formats that are not played back by DVD players or Apple's Quick Time etc.
I see. I will avoid using them in my app.
Minimal example:
MakeFullPathFromAsdPath
is a helper function I've written to handle ASD path-to-full path translation.
I'll have a look that right now... Will reply back when done.
Anke
May 18, 2024, 9:34am
4
zp-zpanda:
Connect to Companion, make a right mouse click on the MakeFullPath... block, "Do it " and post the result.
Where does the audio file (test.mp3) come from?
Which Android version?
Does not work. Player finishes immediately without producing any sound.
Somehow .mp4 files work...
Downloaded to ASD, but I can confirm that packaged assets also fail.
Anke:
Which Android version?
BlueStacks 5 Android 11
Anke
May 18, 2024, 9:39am
7
With Companion? If so, that doesn't make any sense at all. Post the aia.
Anke:
Post the aia.
Please wait a bit... Am packaging...
zp-zpanda:
Please wait a bit...
Minimal .aia:
TestPlayer.aia (2.0 MB)
Anke
May 18, 2024, 10:58am
10
Where is the problem? It works fine here.
Anke:
Where is the problem?
On BlueStacks 5 running Android 11. The Companion App on my phone works fine.
Anke
May 18, 2024, 11:07am
12
Does it (mp3) work with Companion?
Anke
May 18, 2024, 11:09am
14
zp-zpanda:
BlueStacks
Forget BlueStacks, build the APK and you will see it works.
Anke:
build the APK
I'm not allowed to hand in .apk files, only .aia files...
Anke:
Forget BlueStacks
Is it a known bug or something?
Anke
May 18, 2024, 11:18am
17
You should test it with the APK on a real device!
Anke
May 18, 2024, 11:21am
18
I generally don't test with Android emulators. That always just causes problems. I always only test on real devices .
Only with my iOS apps I use the Apple Xcode Simulator, because this works perfectly.
I know... but my work is only graded using .aia files, and .apk files are not taken into consideration...
I see... But sometimes an emulator is all that we students can access...