Could you please explain more explicitly what you are trying to do?  It is
very confusing to me, since <uses-library> is a purely Java language thing,
but you are talking a lot about .so and JNI neither of which is really
related.

For what its worth, if you don't require a library, use
android:required="false" in your uses-library.  Then you can use the normal
Java tricks to not crash if the library symbols are not in your class
loader.

On Thu, Jan 13, 2011 at 12:10 AM, Aaron L. <[email protected]> wrote:

> Hi all,
>
> In the .apk manifest you can add lines such as
>
> <uses-library android:name="com.dev.mylibrary"/>
>
> And then if the library is not present on the device, the application won't
> start.
>
> My question is: is there some sort of call or check I can make from *within
> my JNI or native C++ code* to see if the library is present on the
> phone???
>
> I want to make an .so but to have a check similar to what an .apk does
> automatically with its manifest to make sure it won't load unless this
> library is also on the phone.
>
> Also, the library in question is actually a .jar and not an .so (otherwise
> i could just try loading the library and that would be enough)
>
>
> thanks,
>
> Aaron Lieber
>
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
[email protected]

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.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to