12

I'm doing my first steps in Android development, and came across the term Asset.

As far as I understand it, an Asset is simply a file that is not being parsed or referensed as a resource.

Is there a more accurate definition of the term? In which scenarios should I use an Asset in my application?

Adam Matan
  • 128,757
  • 147
  • 397
  • 562

1 Answers1

13

Assets provide a way to include arbitrary files like text, xml, fonts, music, and video in your application. If you try to include these files as "resources", Android will process them into its resource system and you will not be able to get the raw data. If you want to access data untouched, Assets are one way to do it.

Assets added to your project will show up just like a file system that can read from by your application using AssetManager.

Android has a dedicated folder in its project organization that stores all these files.

Pawan Sharma
  • 3,199
  • 1
  • 25
  • 32