Discussion:
Android N compatibility-HELP
Viru chauhan
2018-06-19 06:19:11 UTC
Permalink
*For Help*
Dear All Android Developer,
I have develop one android application call recording.This app work fine up
to 6.0. i record call using mic and some audio settings changes using
native lib like dlopen("libmedia.so") and use libmedia function and
modified audio but in android 7.1 & 7.2 android os some changes is i am not
use dlopen("libmedia.so") it retruns "*NULL*".i know why this retrun *NULL*
it's about private lib i can not access using *android-ndk* any private lib
than my Question is how to access private lib in android 7.1 &7.2 please
help for step by step solution..
i need solution with development steps.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1aa6a31b-d2d5-4f80-99a6-84f399d991a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Andrew Esh
2018-06-19 16:24:57 UTC
Permalink
I ran into this problem trying to load Gstreamer plugins that I had
packaged as private libraries with my application. In Android N, they began
adding an extra path element to where the private libraries are installed.
Each time the app is installed, a new random name is used to create a
directory for the libraries. (This is done to prevent other apps from using
private libraries from another application.) I had to make a Native-to-Java
call to get the path from the app context like this:

return MyCustomApp.getContext().getApplicationInfo().nativeLibraryDir;

Prepend this string to the file name in the dlopen call, and the library
will be found.
Post by Viru chauhan
*For Help*
Dear All Android Developer,
I have develop one android application call recording.This app work fine
up to 6.0. i record call using mic and some audio settings changes using
native lib like dlopen("libmedia.so") and use libmedia function and
modified audio but in android 7.1 & 7.2 android os some changes is i am not
use dlopen("libmedia.so") it retruns "*NULL*".i know why this retrun
*NULL* it's about private lib i can not access using *android-ndk* any
private lib than my Question is how to access private lib in android 7.1
&7.2 please help for step by step solution..
i need solution with development steps.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/d8a5f324-cf79-4613-8b67-566eed64b642%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alex Cohn
2018-06-25 11:47:52 UTC
Permalink
Post by Andrew Esh
I ran into this problem trying to load Gstreamer plugins that I had
packaged as private libraries with my application. In Android N, they began
adding an extra path element to where the private libraries are installed.
Each time the app is installed, a new random name is used to create a
directory for the libraries. (This is done to prevent other apps from using
private libraries from another application.) I had to make a Native-to-Java
return MyCustomApp.getContext().getApplicationInfo().nativeLibraryDir;
There is an easier way to find that out, when you are already in a native
library: check the directory for the loaded module,
see https://stackoverflow.com/a/1681259/192373. TL;NR: use dladdr()

BR,
Alex
Post by Andrew Esh
Prepend this string to the file name in the dlopen call, and the library
will be found.
Post by Viru chauhan
*For Help*
Dear All Android Developer,
I have develop one android application call recording.This app work fine
up to 6.0. i record call using mic and some audio settings changes using
native lib like dlopen("libmedia.so") and use libmedia function and
modified audio but in android 7.1 & 7.2 android os some changes is i am not
use dlopen("libmedia.so") it retruns "*NULL*".i know why this retrun
*NULL* it's about private lib i can not access using *android-ndk* any
private lib than my Question is how to access private lib in android 7.1
&7.2 please help for step by step solution..
i need solution with development steps.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/365aea67-fd08-42ae-8ee1-8fe17c89bf35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alex Cohn
2018-06-25 11:41:53 UTC
Permalink
If you need* /system/lib/libmedia.so *you should reconsider your design.

BR,
Alex
Post by Viru chauhan
*For Help*
Dear All Android Developer,
I have develop one android application call recording.This app work fine
up to 6.0. i record call using mic and some audio settings changes using
native lib like dlopen("libmedia.so") and use libmedia function and
modified audio but in android 7.1 & 7.2 android os some changes is i am not
use dlopen("libmedia.so") it retruns "*NULL*".i know why this retrun
*NULL* it's about private lib i can not access using *android-ndk* any
private lib than my Question is how to access private lib in android 7.1
&7.2 please help for step by step solution..
i need solution with development steps.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/0ecfac10-0160-4d91-9861-64419c99fa06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...