--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
how to determine this folder programmatically?
Is it with System.getProperty("java.library.path"), which Omar mentions? I can't
remember exactly why, but last time I tried, this didn't fit the job.
Is there any reliable way to know where the libs go?
Olivier
On 06/15/2010 07:00 PM, Dianne Hackborn wrote:
> Currently it will be in /data/data/<package>/lib, but I expect that to
> change in the future.
>
> On Tue, Jun 15, 2010 at 9:37 AM, Alex Cohn <sasha...@gmail.com
> <mailto:sasha...@gmail.com>> wrote:
>
> We all know that the APK installation puts libraries from project's
> lib/armeabi foder into /data/data/<package>/lib folder. Usually, we
> don't really care: System.loadLibrary() in static {} takes care of
> this for us.
>
> But in this specific case, I want to dlopen() a shared library from
> another application's lib folder - this is a way I want to work around
> an open-source licensing issue. If somebody installs the other
> application in an alternative way, maybe on sdcard, will the shared
> library still be found in /data/data/<package>/lib ? Or in another
> well-defined folder? Or maybe, I can use PackageManager class to find
> this location?
>
> Sincerely,
> Alex
>
> --
> You received this message because you are subscribed to the Google
> Groups "android-ndk" group.
> To post to this group, send email to andro...@googlegroups.com
> <mailto:andro...@googlegroups.com>.
> To unsubscribe from this group, send email to
> android-ndk...@googlegroups.com
> <mailto:android-ndk%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/android-ndk?hl=en.
>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hac...@android.com <mailto:hac...@android.com>
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails. All such
> questions should be posted on public forums, where I and others can see
> and answer them.
>
getPackageManager().getApplicationInfo(getPackageName(), 0).dataDir + "/lib/"
But it's apparently not reliable, since Dianne is saying: "Currently it will be
in /data/data/<package>/lib, but I expect that to change in the future."
Is there any solution that I can expect to continue working if this changes?
You know, apps are released for at least 25 years :-p
Olivier
Olivier
Olivier
Are you maybe loading the lib from the sdcard or downloading it?
In this case, the default <datadir>/lib folder won't be of any help to you, it's
read-only. You can't add anything in there.
Olivier
Olivier