Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a redistributable component or library for Android

Tags:

java

android

I'm just starting out on Android and Java programming, coming in from a C++ background. I was wondering - whats the best way to go about making a library/UI widget/component that I can license to third-party developers?

In C++ I'd ship the customers my headers and *.a files, but I don't know the equivalent in Java.

Are there any good resources or links about this, maybe even from general Java development standpoint.

like image 670
Justicle Avatar asked Jun 11 '09 07:06

Justicle


People also ask

What is an Android library?

An Android library is structurally the same as an Android app module. It can include everything needed to build an app, including source code, resource files, and an Android manifest.


2 Answers

you can define activities/services that are available for any other application running on android:

"A central feature of Android is that one application can make use of elements of other applications (provided those applications permit it). For example, if your application needs to display a scrolling list of images and another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own. "

http://developer.android.com/guide/topics/fundamentals.html

like image 134
silmx Avatar answered Oct 12 '22 03:10

silmx


Activities and services have some use but there is a whole class of functionality (fancy table viewer for sql) that isn't covered. You can do jars but I don't think you can have android resources in that file. The work around would be to have a Jar and require the user to copy and paste some text into the apps resource directory. You can look at the admob.com android SDK for an example of this.

like image 24
hacken Avatar answered Oct 12 '22 03:10

hacken