views:

44

answers:

1

We have a manufacturer that wants to pre-install our application on their Android device. We sent them the APK and even though it installs fine when used by a user, it appears to not get installed correctly when included in the manufacturer's build image. FYI, our application uses the JNI layer and some libraries built with NDK. The exception we're seeing seems to indicate that the class loader cannot find the library and is unable to load it. They have verified that the library files are indeed present in the APK.

Since we dont make devices, its unclear why they are seeing this exception and what needs to be done differently when including a package as part of the Android build image.

Any Android folks here care to comment?

+1  A: 

I have worked with pre-installed Android apps, that also uses library files, in my case jar files. I am assuming that you have added the appropriate lines to AndroidManifest.xml like <uses-library android:name..... I am also assuming that you have provided instruction on how to install your library files on handset, with instructions like adb push ... on the command prompt. If you havent, do provide them the instructions.

Another issue may be permissions, we had to get the library jar AND the permissions xml file installed, that may be the issue.

Also ensure that you are using the correct version of Android for testing. And if everything fails, ask them to send one of the handsets that is not working to you and you can then compare with the one in office and debug this. Good Luck, as all this can be pretty frustrating.

omermuhammed
Two of the libraries are actually C shared object libraries that we access via JNI - does that make any difference? (The runtime exception seems to indicate a problem loading the library :-)
Eno
One possible way to debug this is to write a simple test app that just loads these libraries. Give the app to the handset manufacturer. If they are successful in running the app then the exception about problem loading the library is not the issue. Based on their feedback you can then debug this. Just for these kinds of scenarios we have a number of test apps handy. Hope this will help.
omermuhammed