Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8907475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:55:36+00:00 2026-06-15T02:55:36+00:00

I’m developing an Android application that stores its data inside the usual SQLite DB.

  • 0

I’m developing an Android application that stores its data inside the usual SQLite DB. I have to expose these data to the components of my application (activities and services) and to other applications.

Unfortunately, I have to operate on these data in various, maybe complex ways before storing them into the DB and before getting them out of the DB. I have to edit fields, aggregate data from several rows or from several columns and so on. That is: I have to perform the typical “data massage” that you can see performed by many business intelligence program and by many statistics one.

That means that a SQLite DB alone is too little. I have to do much more that a simple CRUD.

A content provider does not seem to be a solution, either. A typical Android CP implements an interface very, very similar to the standard CRUD and, more important, always returns a cursor (a temporary table of data organized in rows and columns). It looks too much like a very thin wrap around a SQL database for my needs. I still have to understand if I can put my business logic inside the CP itself, if I can extend the external CP interface (“content:…”) and weather this could be considered a Good Practice.

Maybe an Android service could give me a way to expose my functionalities and I could embed the SQLite DB (or the CP that contains the SQLIte DB) into the service. I still have to understand if this can be a solution and how.

What I really need, most likely, would be something like a RESTful web service:

  1. A SQL DB that stores then data, at the core of my “thing”
  2. An interface that accepts verbs (GET, PUT, POST, etc.) and singular/plural names (“People”, “John Doe”, etc.) and returns “objects” (not necessarily “Java Objects”. They could just be JSON or XML files/streams). This interface would be the only layer visible from the outside.
  3. In the middle, my “business logic” used to operate on data.

Of course, a standard CP is very similar to a RESTful WS and could well be a solution to my problem. I just cannot understand if a CP is flexible enough for this. For example, it looks like a CP can accept only GET/PUT-like requests and that it cannot return anything else than a cursor.

So, what would you use to expose non-just-CRUD functionalities and not-just-elementary-data to the various part (activities) of your application and to other applications?

Just an Android Content Provider (maybe writing you business logic inside the CP itself)?

An Android service that wraps around a SQL DB (or even that wraps around a CP)?

What else?

Which architecture would be most elegant (“maintanable”, “extendable”, “flexible”, “open”)? Do exists any “Best Practice” for this?

Your considerations/suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:55:37+00:00Added an answer on June 15, 2026 at 2:55 am

    I am not sure that I have good understanding of your problem, but it seems that you a little confused with interchanging SQLite,CP,Service. Usually they work side by side.
    Maybe it can help you: Google I/O 2010 – Android REST client applications .

    My suggestion/assumption:

    ->Activities,POJOs -> Service (HadlerThread (Separate Thread + MessageQueue)) -> CP

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.