In Stack Overflow or other example, I found that from asset folder and from network I can play audio file easily.
But, There is no clear approach That I can play audio file from Application Storage or mobile device.
My Audio path is : String playebleFilePath = '/Users/noorhossain/Library/Developer/CoreSimulator/Devices/5C9813C4-7773-4013-B086-279DB8FCA64F/data/Containers/Data/Application/F905830C-C698-4FEB-80F1-FB386BE18882/Library/Application Support/VocalDatabaseAudio/word_audio_one/2.mp3'
final assetsAudioPlayer = AssetsAudioPlayer();
assetsAudioPlayer.open(
Audio.file(playebleFilePath),
);
How can I play Audio from this storage path ?
My error log says : plugin Exception, cannot find the file in this server.
Any solution ?
I think the exception is due to the fact that the file you are trying to play is not in the assets folder which will cause the plugin to throw an exception.
i have been using audioplayers plugin and for assets it actually has a prefix to the path that actually points to an "assets" folder, the assets folder should also be correctly referenced in the pubspec.yaml file...
then more importantly since it seems you want to use app directory, consider using something like:await audioPlayer .play(DeviceFileSource("directory/path to your song"));
just check out the getting started of the audioplayers library: [ [1]: https://github.com/bluefireteam/audioplayers/blob/main/getting_started.md][1]
The upload failed and I see there is a warning that MANIFEST.in does not exist and standard file not found: should have one of README, README.txt, README.rst.
Can someone please help? I'm not sure if I need to create the manifest template and standard readme files or if there's something wrong with the code I'm using:
C:\Users\Sean\Desktop\Projects\Head_First_Python\nester>python setup.py sdist upload
running sdist
running check
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)
warning: sdist: standard file not found: should have one of README, README.txt, README.rst
writing manifest file 'MANIFEST'
creating nester-1.0.0
making hard links in nester-1.0.0...
hard linking nester.py -> nester-1.0.0
hard linking setup.py -> nester-1.0.0
Creating tar archive
removing 'nester-1.0.0' (and everything under it)
running upload
Submitting dist\nester-1.0.0.tar.gz to https://upload.pypi.org/legacy/
Upload failed (403): Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for details
error: Upload failed (403): Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for details
C:\Users\Sean\Desktop\Projects\Head_First_Python\nester>
i am new with java and andengine and try to make the released jumper game to learn how it works. all fine now but if i try to load the PhysicsWorld i will get as follow errors:
E/AndroidRuntime: FATAL EXCEPTION: UpdateThread
Process: com.alex.neuertest, PID: 15463
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.alex.neuertest-1/base.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.alex.neuertest-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.alex.neuertest-1/lib/x86, /data/app/com.alex.neuertest-1/base.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_dependencies_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_0_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_1_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_2_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_3_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_4_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_5_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_6_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_7_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_8_apk.apk!/lib/x86, /data/app/com.alex.neuertest-1/split_lib_slice_9_apk.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libandenginephysicsbox2dextension.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:972)
at java.lang.System.loadLibrary(System.java:1530)
at org.andengine.extension.physics.box2d.PhysicsWorld.<clinit>(PhysicsWorld.java:35)
at com.alex.neuertest.GameScene.createPhysics(GameScene.java:345)
at com.alex.neuertest.GameScene.createScene(GameScene.java:96)
at com.alex.neuertest.BaseScene.<init>(BaseScene.java:41)
at com.alex.neuertest.GameScene.<init>(GameScene.java:0)
at com.alex.neuertest.Core.SceneManager$1.onTimePassed(SceneManager.java:148)
at org.andengine.engine.handler.timer.TimerHandler.onUpdate(TimerHandler.java:94)
at org.andengine.engine.handler.UpdateHandlerList.onUpdate(UpdateHandlerList.java:47)
at org.andengine.engine.Engine.onUpdateUpdateHandlers(Engine.java:618)
at org.andengine.engine.Engine.onUpdate(Engine.java:605)
at org.andengine.engine.LimitedFPSEngine.onUpdate(LimitedFPSEngine.java:57)
at org.andengine.engine.Engine.onTickUpdate(Engine.java:568)
at org.andengine.engine.Engine$UpdateThread.run(Engine.java:858)
maybe anyone can help me whats there wrong? how i said, iam new on this system xD
This error means that the library for physics box was not found. You have to add physicsbox2dextenstion.so file in app folder as shown in picture. You may be clear after watching picture. Hope this help you.
Project not able to find libandenginephysicsbox2dextension.so. Check do you have .so files inside your project. For different cpu architecture there are three .so file inside AndEnginePhysicsBox2DExtension.
I'm trying to use the "Itext" applications. I've downloaded the "jar" file from http://sourceforge.net/projects/itext/ and trying to launch the file: itextpdf-5.5.5.jar but get an error:
"no main manifest attribute, in itextpdf-5.5.5.jar"
Could you please help me and explain how can I launch it? It seems that there is no declared main class in the manifest.
I am trying to find files located in assets. I have .txt, .gif, and .db files that are there in an eclipse android project but do not display when I run the following code:
AssetManager am = getAssets();
try {
String list[] = am.list("/");
I=0;
Str="";
while (list[] != null) {
Str=Str+"\r\n"+list[I];
I++;
}
}
catch(exception e){
}
I get this list:
AndroidManifest.xml
META-INF
assets
classes.dex
com
res
resources.arsc
This list does not include any of the files in assets.
Project properties is currently set to not include assets folder in the build path. When I do include the assets folder in the build path, it gives me the same list with ".." as the first file.
I have tried changing "/" in the third line to "/assets/" but get nothing returned.
Changing the Android Project Build Target between Android 2.3.1 and Android 2.1-update1 appears to have no effect.
Is there a setting in the project properties that is required for files in assets to be included in the build? Is there a different name for the assets directory using AssetManager?
list() takes a relative path within the assets. Seems in your case you need to pass an empty string, am.list("")