xamarin android application: how to get the Resources folder of my project

10,523

If you are trying to store images you get from somewhere the runtime, you probably shouldn't be using the resources directory. Instead, you should save them in a directory on the SD card, see this post: Android saving file to external storage

Otherwise, if you're just trying to access resources that you've included while building your application, this Xamarin guide should tell you everything you need to know: http://docs.xamarin.com/guides/android/application_fundamentals/resources_in_android/part_1_-_android_resource_basics/

Share:
10,523
Stefan van de Laarschot
Author by

Stefan van de Laarschot

Software Developer from the Netherlands Pure Passion And Self Learning ! My Skills: VB.net, C#, Xamarin Forms, IOS, Android, MSSQL, JQuery, Javascript

Updated on June 05, 2022

Comments

  • Stefan van de Laarschot
    Stefan van de Laarschot about 2 years

    How can i get the Resources folder of my project like Resources/Drawable i need this to store Images on the app for later use

    I tryed:

    var Path = (System.Environment.CurrentDirectory + "/Resources/Drawable");
    

    But i didnt work because i use this in a .cs (Class File) thats defined in the map App_Code how can i get the Resources map i think there is an much easier way to get this.