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

  • SEARCH
  • Home
  • 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 7574899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:33:00+00:00 2026-05-30T16:33:00+00:00

I am new to Android development and playing with content providers and content observers.

  • 0

I am new to Android development and playing with content providers and content observers. However I am having trouble finding examples online. I have been playing and reading about this but have become stuck. Here is what I am trying to do:

I have created a small content provider (that I have confirmed is working and inserting/deleting data in a db on the phone). We will call this A.apk. Now I want to create a B.apk that will be notified with any updates done to the db. So if new content is created B will display it and if content is delete it will be removed from B’s view.

I am stuck and would love to see how this is done correctly using best practices. An example would be much appreciated!

  • 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-05-30T16:33:02+00:00Added an answer on May 30, 2026 at 4:33 pm

    This is actually very easy.

    1. Just implement a ContentObserver and register it with the URI of the database to watch. In the example about when A uses B’s ContentProvider to put data into B’s defined database, B’s ContentObserver’s onChange() method will be triggered. There is a problem however if B is not running when a change is made.

    2. Another solution is for A to use B’s ContentProvider to insert data into B’s database, then send an intent to B that new data is waiting.

    3. Or in the implementation of B’s ContentProvider it could start and Activity belonging to B.

    Depending on what the application’s needs and concerns are will determine which method to use.

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

Sidebar

Related Questions

I am new to android development and I have been having issues with Force
I'm new in Android development and I have the next question/problem. I'm playing around
I'm new in Android development and I have the next question/problem. I'm playing around
I'm new to Android development, and I've been playing around with it a bit.
I am new to Android development and i have been asked to create an
Hi I am new into android development and I am having trouble into this
I am new to Android development so have been picking things up over the
I am new to Android Development and I am having trouble with my XML
I'm quite new to Android development (started 2 days ago) and have been through
I am still pretty new to Android development, and I have not been able

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.