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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:14:31+00:00 2026-06-09T06:14:31+00:00

I am developing an app that needs to refer to data in a number

  • 0

I am developing an app that needs to refer to data in a number of XML files. There are a lot ( ~40) XML files required by the app.

The file have names like “AbnormalFlags-v1.0.xml” and I current have them located in

res/raw/v2/AbnormalFlags-v1.0.xml
res/raw/v2/ActualDeliveryPlace-v1.0.xml
res/raw/v2/AddressType-v1.0.xml … …

A number of questions

  • Is this the best place to locate these files ?
  • The filenames seem to be a problem, will that cause issues
  • Because I have to dynamically determine which file to use I use the:

    xmlFile = getApplicationContext().getResources().getIdentifier(xmlFileId,"raw","com.apps4health.refpack");

This does not find the resource file, where am I going wrong ?

  • 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-09T06:14:32+00:00Added an answer on June 9, 2026 at 6:14 am

    Given the format of the file names I would suggest you to save them in the assets folder. Create a folder named assets inside the res folder and put there the XML files.

    The code below shows how to open files in the assets directory:

    InputStream is = null;
    try {
       AssetManager am = getApplicationContext().getAssets();
       is = am.open("AbnormalFlags-v1.0.xml");
       // Process the XML file from "is"...
    }catch( IOException e ) { 
       // Handle exception
    }
    

    AssetManager is responsible to open files saved in the res/assets folder. You just call the open() method passing the file name as argument.

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

Sidebar

Related Questions

We are developing an iphone app that needs to process audio data in real
I'm developing an app that (I believe) needs root privilege. There are plenty of
I am developing an app that needs to send text messages, so I have
Recently I have been developing an app that needs AES encryption. I am using
I am developing an iphone app that needs to parse data received from server.
I'm developing a web app that needs to use HTML5 websockets. Is there any
Currently, developing an app that needs to synchronize its data between a server. The
I am developing an app that needs the chat functionality, presenting messages sent and
I am developing the app that needs the two scrollview which is like follow
I'm currently developing a facebook app that needs access to a users photos. It

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.