josemwarrior
josemwarrior

Reputation: 378

How could I know if my Android device will support C instructions?

Is there some way to know if my Android device will support a native call to a JNI library before I call it??

Suppose that the app runs on an architecture where there is no compatible abi (x86, mips ...), I wanna catch the error (for example with a try catch) instead the app stop immediately for trying a call to JNI where there is no abi compatible with his CPU.

How could know this?

Upvotes: 1

Views: 54

Answers (2)

josemwarrior
josemwarrior

Reputation: 378

If you publish your app through Google Play, you don't have to do anything, cause Google Play only show the app if this is compatible with your device.

In any other case, if you try force install an app with another architecture, give an error in the installation time.

Upvotes: 1

V-master
V-master

Reputation: 2177

System.loadLibrary() is first one that will throw UnsatisfiedLinkError if JNI library does not exists for current platform.

Upvotes: 0

Related Questions