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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:13:57+00:00 2026-06-14T18:13:57+00:00

I have the following situation, I have an Android codebase where I read data

  • 0

I have the following situation, I have an Android codebase where I read data from a DB on an sdcard.
Now Lets say I have two folders mnt/sdcard/folder1 which has 1.sqlite in it and mnt/sdcard/folder2 which has 2.sqlite in it. Is there a way I can build and install two apk’s 1.apk and 2.apk which read from the respective folders and databases at runtime? The codebase is the same – just at run time – one of the apk’s is called 1.apk which knows it has to read from the first folder and the second from second. And both are installable at the same time.

OR

is there a better way to achieve this ?

  • 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-14T18:13:58+00:00Added an answer on June 14, 2026 at 6:13 pm

    I’m not entirely clear on what you’re trying to do, but the only way to have two versions of your code running on the same device is to have two different package names for the two .apk files.

    Put your common code base into a library project, then define two application projects, one for each configuration. Make each application project dependent on the common code base and just define the few things you need that are specific to each configuration.

    If you need both applications running at the same time, I think this is the only way to do it. However, if you need an application that can behave selectively one way or the other when it runs, then it sounds like you can just use some run-time flags.

    Alternatively, you can make each data set accessible through a service and dynamically attach to the required service at run time. Whether this makes sense depends on what you’re trying to accomplish with all this.

    EDIT Another approach is to have separate launch icons for the two behaviors, each tied to a different activity in your application. See this thread for more info about this approach.

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

Sidebar

Related Questions

Consider the following situation: I have two android projects named P1 and P2 which
Some specific situation: I have two Activities . FirstActivity loads data from network(~100 kb)
I have following Situation, Server A sends some data (HTML form) to server B,
Let's say that I have following situation. I have many customers and many consultans,
I just encountered the following situation. I have an Android app with a scenario
For some reason, I have following situation: Now I want to get rid of
I have the following situation: excel-like application, that is accessible from internet. 2 users
So I'm making this android application, that needs to read data from user-provided CSV
I have the following situation, I want to monitor the system calls on Android
So my situation is this. I have two tables. A main table where data

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.