Release 4.0.0-preview1-00235
[platform/core/csapi/tizenfx.git] / src / Tizen.Applications.Common / Tizen.Applications / ResourceManager.cs
index 3212fac..d300c57 100755 (executable)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.IO;
 using Tizen.Internals.Errors;
 
 namespace Tizen.Applications
@@ -105,8 +106,22 @@ namespace Tizen.Applications
         public static string TryGetPath(Category category, string id)
         {
             string path;
-            ErrorCode err = AppResourceManagerGet(category, id, out path);
+            ErrorCode err;
+            string res;
+
+            if (Application.Current != null)
+            {
+                res = Application.Current.DirectoryInfo.Resource + "res.xml";
+            }
+            else
+            {
+                res = Interop.AppCommon.AppGetResourcePath() + "res.xml";
+            }
+
+            if (!File.Exists(res))
+                return null;
 
+            err = AppResourceManagerGet(category, id, out path);
             switch (err)
             {
                 case ErrorCode.InvalidParameter: