I have an external jar file that we have been using to import into an application apk. Recently I added a Android service class into the jar file, now when I import the file into an apk, I can instantiate all classes except the service. I have declared the service in the applications manifest file (with fully qualified class path), but when I try to bind to the service using context.bindService(intent, connection, BIND_AUTO_CREATE), nothing happens. I dont get any exception, nor an error message, but service is not instantiated, as the return value for bindService is false.
I examined the contents of jar file to make sure that the service class is actually included. I also further dedexd the application dex file and even there the library service class was present. Any ideas what could be the problem? I have read several posts on this, but still unable to figure out the problem. What I really want to achieve is provide a Android service class in a library (jar file), so application developers can simply bind to the service and it starts the run within the context of the application. I don't want the service to be remote, hence not using AIDL. Also the jar is built using ant build.xml, its not marked as a library project, but just as a regular jar file that can be imported into any application. The goal is to distribute the jar file without the source code, hence not marking it as library. RK. -- -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

