/// <summary> /// Starts the web browser, pointing at a given address. /// </summary> /// /// <param name="applicationProductId"></param> /// <param name="applicationGenre">The genre of the application being installed</param> /// <param name="pathToXap">The path to the local XAP file.</param> /// <param name="update">If true, the application will be updated if already on the device; otherwise, the application will be uninstalled before being reinstalled</param> public void Start(Guid applicationProductId, string applicationGenre, string pathToXap, bool update) { this.Start(); if (currentDevice.IsApplicationInstalled(applicationProductId)) { application = currentDevice.GetApplication(applicationProductId); if (update) { application.UpdateApplication(applicationGenre, "", pathToXap); } else { application.Uninstall(); application = currentDevice.InstallApplication(applicationProductId, applicationProductId, applicationGenre, "", pathToXap); } } else { application = currentDevice.InstallApplication(applicationProductId, applicationProductId, applicationGenre, "", pathToXap); } application.Launch(); }
public void Start() { var oneTimePhoneEmulatorDialogMonitor = new OneTimePhoneEmulatorDialogMonitor(_logger); // Get CoreCon WP7 SDK _logger.Debug("Connecting to Windows Phone 7 Emulator/Device..."); _wp7Device.Connect(); _logger.Debug("Windows Phone 7 Emulator/Device Connected..."); Uninstall(); _tempFileName = Path.GetTempFileName(); File.WriteAllBytes(_tempFileName, _xapHost()); _logger.Debug("Loading into emulator: " + _tempFileName); Thread.Sleep(2000); _remoteApplication = _wp7Device.InstallApplication( _appGuid, _phoneGuid, "WindowsPhoneApplication1", null, _tempFileName); _logger.Debug("StatLight XAP installed to Windows Phone 7 Emulator..."); _remoteApplication.Launch(); _logger.Debug("Launched StatLight app on Windows Phone 7 Emulator..."); }
protected override void LaunchApp(AppInfo app) { RemoteApplication appOnDevice = nativeDevice.GetApplication(app.AppGuid); appOnDevice.Launch(); }