Example #1
0
 protected override string GenerateInfo(string filename)
 {
     try {
         var manifest = AndroidAppManifest.Load(filename);
         return(manifest.PackageName);
     } catch (Exception ex) {
         LoggingService.LogError("Error loading android manifest '" + filename + "'", ex);
         return(null);
     }
 }
Example #2
0
        static bool GetActivityNameFromManifest(IProgressMonitor monitor, MonoDroidProjectConfiguration conf, out string activity)
        {
            activity = null;

            var manifestFile = conf.ObjDir.Combine("android", "AndroidManifest.xml");

            if (!File.Exists(manifestFile))
            {
                monitor.ReportError("Intermediate manifest file is missing", null);
                return(false);
            }

            var manifest = AndroidAppManifest.Load(manifestFile);

            activity = manifest.GetLaunchableActivityName();
            if (string.IsNullOrEmpty(activity))
            {
                monitor.ReportError("Application does not contain a launchable activity", null);
                return(false);
            }

            activity = manifest.PackageName + "/" + activity;
            return(true);
        }