On Fri, Jul 8, 2011 at 9:56 AM, Raghav Sood <[email protected]> wrote:
> 1) Will I write this like an ordinary app? It will have a service that
> connects to the internet to update a database or file (haven't decided yet).

You will have it as a project to generate your JAR, with a separate
sample project showing how to use the JAR/library. Visit
http://github.com/commonsguy and check out my cwac- family of repos
for the pattern I use, with a demo/ subproject inside the main library
project. Those are mostly Android library projects that also can be
packaged in the form of a JAR.

> 2) Do I need to have an activity even if all I need is the service?

No, because the hosting project can supply whatever activities are needed.

> 3) How do I compile it as a jar and not an apk?

In Eclipse, I haven't a clue, though I presume there's some settings
you can use to convert a traditional Android project into one
generating a JAR. In Ant, you will create a custom Ant task or two to
assist. See the build.xml files in the aforementioned cwac- projects.

If your project will have resources, you will need to make it an
Android library project. This puts some limitations if you want to
ship the code *only* in JAR, as opposed to a full open source project.
I have some documentation at the moldy http://andparcel.com site (also
reproduced in newer versions of _The Busy Coder's Guide to Advanced
Android Development_) that covers some of this.

> 4) My planned functionality is: Having an install count. This is kept using
> a unique identifier for each and every device (that is each device, say HTC
> Wildfire will have a unique identifier and not all the Wildfire's sharing
> one.) I also plan on statistics. Is there anything else I should include?

There are a number of analytics packages out there, particularly
commercial ones (e.g., Flurry, Medialets). There might be open source
ones, too -- I haven't gone looking for that recently.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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

Reply via email to