It’s been a while since FMOD is now on Android.
I have Googled everywhere, but i cannot find hints or guides how I can setup FMOD NDK in my existent project.
I cannot start with the Nativity example as base, as I am using an SDK and therefore need to use the template project as a base. I need to include the FMOD bits in my existent project.
I have successfully set up FMOD in iOS and Windows without any problems. Android is a big challenge.
Any help, links or tips would be greatly appreciated. I’m sure there are others with my same dilemma.
- bjadams asked 6 years ago
[quote:2lli1xro]…the project crashes as soon as it launches, even without any FMOD commands.[/quote:2lli1xro]
The most common cause of a crash when the application opens is due to unresolved dependencies from the dynamic libraries. Double check you have the following Java code, substituting ‘main’ with the name of your native code library that uses FMOD. As Android does not automatically load dependencies, ensure fmodex is first, then your lib.
[quote:2lli1xro]Obviously I am missing something important.[/quote:2lli1xro]
Make sure your AndroidManifest specifies the package and class that extends native activity (the code file that has the above static section).
[quote:2lli1xro]Does org.fmod.nativeactivity under SRC and GEN have to be named org.fmod.nativeactivity, or it can be any name? [/quote:2lli1xro]
No, it can be anything you like.
My recommendation would be to familiarize yourself with the Android NDK first, perhaps take a look at some of the NDK samples. Essentially you are making a native interface between your Java app and the FMOD code, this is independent to the Java code so using it with an existing project should be straight forward.
We use the same ‘ndk-build’ system that the Android examples use, use this to build your native code which links to FMOD. Each of our examples have an Android.mk that demonstrates how to link C code with our libs, you can use this too. Next you need to modify your Java code to load the fmodex library, you can see this in all FMOD examples in the ‘static’ section of the Java code file. Finally make sure you compile in our FMOD java code so you can use the FMODAudioDevice class.
If you need more help let me know your progress and I’ll try my best to solve any issues you run into.
I have already analysed ALL the files, one by one that came with the Nativity example, and copied the relevant bits into my project.
However the project crashes as soon as it launches, even without any FMOD commands. the fmod libs are being included, as i already checked. Obviously I am missing something important.
Does org.fmod.nativeactivity under SRC and GEN have to be named org.fmod.nativeactivity, or it can be any name? Because I already have a com.companyname.sdkname here from the sdk I am using.
Also, how come no one has done a step by step guide how to put the relevant fmod bits into your own android ndk project? is everyone only using java on android?
i found many guides for ios and it was super easy to integrate fmod with my xcode project! worked on the first try!
thanks a lot
- bjadams answered 6 years ago
Please login first to submit.