It depends on what you mean by "they can use".
If you just want them to be able to run your application on their phones (or emulators) you can give them an .apk
file, which is the standard format for Android Applications. The easiest way to produce an .apk
is to use the Android Development Tools (ADT) plugin for Eclipse. Otherwise you'll have to use the aapt
command.
If you want to allow them to add your classes to their applications you'll have to give them a .jar
file containing your compiled .class
files. However, it is possible to turn .class
files back into .java
files using a decompiler so you if you really don't want them to see your code you may be stuck.
There are tools - known as obfuscators - which make the decompiling process harder, but personally I wouldn't bother with them here as they also make debugging harder too.
It won't be possible for anyone to turn your .apk
back into source. Android uses a different Virtual Machine to standard Java and so has .dex
files with Dalvik bytecode rather than .class
files with JVM bytecode, and currently there are no tools that turn .dex
files back in to .java
source files.