DLL not found

That was cross compiled with the magic leap lumin OS sdk.

They have since, changed up their build, and Pulse has changed its build system.

So I’d need to conform one to the other

I thought if I built for a generic android that would cover more systems

I can build a PulseC for Arm7

That would be amazing. Thanks!

Here is where I am getting my dockers from
I will try the ARMv7 (but there is an ARMv7a as well…)

ARMv7 is here

Thanks! I will try it right now

Well… It did not work. Maybe the problem is somewhere else and it’s not because of the DLL file. Maybe in the PulseEngineDriver.cs ?

That’s running fine, you are calling the allocate in C#, which is a function implemented in C++ and the PulseC.so contains the implementation. Since the library does not load, you crash.

Can you double check your target platform with the Droid Info App

This is what I get for my Pixel

I am using two different Android devices, so here are the screenshots of both:

Are you running the unity build directly on these devices, or is there way you are emulating them?

I will look to put up a PulseC.so for arm7a today

I honestly don’t know the process for building/supporting native libraries for android distribution
Is it somewhat analogous to how pip install works?
The developer has to upload installs for multiple operating systems/architectures to the android store
and the device passes up its architecture information and the store can properly see if the app has a version for the requested device or not
So its a lot of responsibility for the developer to provide lots of builds to support multiple configurations…

Or is there a few basic platform targets for native libraries to build to that will cover most android devices well…

i just do not have enough android native development/distribution/support experience

So we are kind of feeling around in a dark room…

I am building directly to the devices, but you could easily emulate them with an Android Emulator (Nox Player or Bluestacks4) as there are only a few architectures that work on most devices. If you implement those, it should work with no problem… But what I don’t understand is why isn’t Unity finding the dll.

I was looking into the Pulse v2 version of the asset and I don’t see a difference in the way that the DLL is being loaded, so I really don’t know why it does not work in v3 of the asset. The solution that is posted in support forums is to create a .so file for the specific version of Android and calling it directly from the file that requires it,

I will try with the PulseC.so today and let you know, but also try to get some more information on the problem so we can solve it.

Yeah, I am not sure how this is not getting found
I assume you have deleted or replaced the PulseC.so in the Pulse asset
(Heck delete all the PulseC.dll files and the PulseC.dylib too)

Usually, You need to somehow tag it with the right metadata for it to be found…
I am also not sure if the same exception is really not found, or it was found and unity cannot load it

where is the unity support post you referred to?

Here is how my C# code references the dll
https://gitlab.kitware.com/physiology/engine/-/blob/master/src/csharp/pulse/PulseEngine.cs

Yes, I have tried to replace/remove and even rename the file but for some reason it does not work.

I found some information here:

Plugins for Android Documentation:

https://docs.unity3d.com/Manual/PluginsForAndroid.html?_ga=2.46227492.2085545952.1595478802-1940716849.1585775750

Native (C++) plug-ins for Android

https://docs.unity3d.com/Manual/AndroidNativePlugins.html

Unity forum

https://answers.unity.com/questions/1034815/how-to-include-a-native-android-library-plugin.html

I wonder if I need to have the android unity extension installed on my machine when I build the asset? That seems kind of silly though…

I added an android-arm PulseC to the folders that keep sending you too. Still building arm7a version… Should be done shortly…

I went ahead and checked the actual apk file built from Unity and it does include the DLL, but for some reason it crashes when looking for it.

The ARMv7a is also up in here now
https://data.kitware.com/#collection/59849c788d777f7d33e9c084/folder/5da739b0d35580e6dc9e9c79

Thank you I will try it and report back

I tried it in multiple ways, with multiple architectures… and it did not work. I really don’t know what could be the cause

Can you setup a scene in the pulse asset that just has the vitals monitor in an android emulator?
Or at least a setup guide?
That seems to be a way to quickly test…

I will see if I can do it, but any help getting me up will shorten investigation time

For sure! What I do is that I open the Vitals Monitor Scene included in the asset and build it to Android directly after changing the .so file. It gives the same error as it still cannot find the dll.

About changing the dll, I download the .so files that you sent and replace them either in

Assets/PulsePhysiologyEngine/Plugins\Native
or
Assets/Plugins/Android/Libs/armeabi-v7a

It should be super easy to reproduce