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 7894273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:21:12+00:00 2026-06-03T07:21:12+00:00

My app has these parts A. Main activity B. Widget provider C. Sync Adapter

  • 0

My app has these parts

A. Main activity
B. Widget provider
C. Sync Adapter  (talks to the cloud)
D. Local persisted data (small, about 1-2KB).

A,B,C read/write from/to D. The app does not interact with other apps and all the parts are in a single apk.

  1. Can I implement the storage D as a singleton of a class with plain Java API that is not a ContentProvider? (I prefer not to use SQLite but a single flat file that I manage, this code and a proprietary API already exists. Adding proper synchronization should not be a problem).

  2. Are all the parts A,B,C,D guaranteed to run in the same process and same class loader, sharing the same singletons?

  3. Currently the app does not have an Application class. Should add one and tie the D singleton to it or is there is no real need to have an Application class?

  4. Anything else I should be aware of?

  • 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-03T07:21:14+00:00Added an answer on June 3, 2026 at 7:21 am

    Can I implement the storage D as a singleton of a class with plain Java API that is not a ContentProvider? (I prefer not to use SQLite but a single flat file that I manage, this code and a proprietary API already exists. Adding proper synchronization should not be a problem).

    Yes you can.

    Are all the parts A,B,C,D guaranteed to run in the same process and same class loader, sharing the same singletons?

    Yes if they are in the same application (so defined in the same AndroidManifest)

    Currently the app does not have an Application class. Should add one and tie the D singleton to it or is there is no real need to have an Application class?

    No you do not need it.

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

Sidebar

Related Questions

I'm creating android app that has table layout for the main activity, and that
I have a main Activity and one fragment . The main Activity has the
I've got an app that has two parts. Basically, the first part shows a
I am writing a C# app that has a main window and a separate
My app has normal users: those which come through a typical signup page facebook(FB)
My app has a registered shutdown function and it seems there's some issues with
Is there a way to get a system notification when an app has been
My iPhone app has a built in RSS reader. There are images and I'd
I have an app that has a TableView, NavigationView and TabBar running together. There
My app has several buttons which trigger different events. The user should NOT be

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.