Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How get Mono Xamarin Android app path folder?

Mono (Xamarin) Android application path, how do get? I found one way, it look like better I found

string path = "";
System.Collections.IDictionary vars = System.Environment.GetEnvironmentVariables();
foreach (System.Collections.DictionaryEntry entry in vars)
{
     if (entry.Key.ToString().Contains("HOME"))
         path = entry.Value.ToString();
}
like image 307
vitalinvent Avatar asked Apr 15 '15 07:04

vitalinvent


1 Answers

In your Android application you could use:

// Documents folder
string documentsPath = System.Environment.GetFolderPath(
   System.Environment.SpecialFolder.Personal);

This will get you the path:

/data/data/YourAppName/files/
like image 152
User1 Avatar answered Sep 24 '22 20:09

User1