O'Reilly logo

Xamarin Mobile Development for Android Cookbook by Matthew Leibowitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading bundled assets and resources

Almost all apps include some sort of content with the app package; it can be a database, image, or just plain text.

How to do it...

We can only get read-only access to bundled assets and resources but that is often all that is needed, as most app data comes from other sources such as the Internet or device sensors. We will create and add three basic types or resources by performing the following steps:

  1. Starting with assets, create a folder named Assets at the root of the project.
  2. Create a new file in the new Assets folder and save some text into that file, for example, a file named MyAsset.txt with the following contents:
    Hello Asset World!
  3. Now, mark the file as an asset by selecting the file. In the Properties

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required