Hello,

I have a requirement that I'm finding not trivial to solve, at least for 
someone who is not at professional level
in Android development.

I am developing an API that stores user request (GET, PUT, POST, DELETE).
Those request can be issued by any App that uses my API and  are stored in 
a SQLite DB
that belongs to my Manager App (the API exposes a content provider for this)
which deals with maintaining different users' accounts
and queuing all requests and executing them when there is network available.
Each request is associated to it's owner (user id) and source (App package).

The requests are executed when there is network coverage which, in my 
specific context,
will happen mostly when the Apps that generated the request are switched 
off.

The request are executed by an IntentService which is fired when network is 
connected.

Now the problem:

How can this IntentService update each App information using their business 
logic when
the Apps are offline?

I thought about having in the API a base class that would have to be 
extended by the Apps'
developers and in that class they would implement the parsing of HTTP 
responses (which I get for them) accordingly to
their App's business logic.
But: 1) how can I invoke that code for parsing responses from within my 
intent service which belongs to
my Manager App? 2) how would I know what to do specifically with each 
request?

So I thought I should pass an method along with each request (from third 
party App), and that method should be executed
after that request is executed (a callback mechanism but across Apps).

Well I would appreciate any help, either on my logic of solving the problem 
or any advice of how it can be achieved on
android.

Thank you all in advance,


Oleksandr

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