Showing posts with label SharePoint Apps. Show all posts
Showing posts with label SharePoint Apps. Show all posts

Sunday, December 30, 2012

Installing Windows Store Apps on a Microsoft Surface for Windows RT Tablet

imageMy (@rogerjenn) Windows Azure Mobile Services Preview Walkthrough–Part 5: Distributing Your App From the Windows Store post of 9/22/2012 described issues raised during Microsoft’s testing for hosting the OakLeaf ToDo sample application in the Windows Store. Testers reported the OakLeaf ToDo app’s failure to operate as expected during repeated attempts to have it listed.

imageIn order to test the app under conditions that better simulate Windows Store testing, I purchased a Microsoft Surface with Windows RT (a.k.a. Surface RT) tablet computer on 12/19 and received it on 12/20/2012. My initial tests were of a C# SharePoint App with a Visual Studio LightSwitch HTML 5 Client Preview 2 UI autohosted in Window Azure. My LightSwitch HTML Client Preview 2: OakLeaf Contoso Survey Application Demo on Office 365 SharePoint Site and Running the SurveyApplicationCS Demo Project under Windows 8 RT on a Microsoft Surface RT Tablet posts describe the SurveyApplicationCS project.

Following are posts by Magenic’s Rocky Lhotka and Larry Louisiana that describe the processes I’ll use for testing the OakLeaf ToDo Windows Store app. I’ll update this post with links to the test results when completed.

Updated Rocky Lhotka’s article on 12/30/2012 with a note and screenshot showing that an administrator can’t execute PowerScript’s Set-ExecutionPolicy unrestricted command.


Rockford Lhotka (@RockyLhotka), Magenics CTO and Principal Technologist, explained Testing a WinRT app on a Surface RT in a 12/20/2012 post to his blog:

imageA colleague of mine at Magenic recently posted on how to deploy and debug a WinRT app on a Surface RT [see post below.]

Another alternative is to install the app onto the Surface device via PowerShell. This won’t attach the debugger, but is often an appropriate solution for people who are just testing the app (QA testers, colleagues willing to provide feedback, etc.).

This is a multi-step process. At a high level it goes like this:

  1. Developer packages the WinRT app to a folder on their hard drive, then puts the package on a network share or USB key, etc.
  2. Tester unlocks PowerShell on their device (this is a one-time thing)
  3. Tester gets the WinRT app package and runs a PowerShell script to install the app on their device
Creating the Package

The developer needs to create a distributable package for the app. This is done by right-clicking on the WinRT project in the Visual Studio solution explorer, and choosing Store –> Create App Packages.

image

This brings up the Create App Package wizard. The first question is whether you want to deploy the the store, and the answer in this case is No.

Next, you’ll be asked where to create the package, how to create the package version number (different from the app version number) and what platforms to target.

image

The Neutral architecture in Release (Any CPU) allows testing on Intel and ARM devices.

When the Create button is clicked, the project is built and packaged, with the results placed in the specified folder.

image

The top level folder contains an appxupload file that you can safely ignore (it is used for uploads to the store). It also contains a sub-folder with the actual app package.

image

These are the files you must make available to the tester. You can put these files on a network share, a USB key, a SkyDrive folder, or any other location where the tester can gain access. The Add-AppDevPackage.ps1 file is the PowerShell script the tester will run to install the app.

Unlocking PowerShell

The tester’s device must be able to execute PowerShell scripts before they can install the app. By default PowerShell has security settings that prevent scripts from executing. This TechNet article discusses running PowerShell scripts. In summary, you need to open PowerShell as Admin and run this command:

Set-ExecutionPolicy unrestricted

Note: Users with an Administrative account can’t execute the above command. See screen capture below. You are given the opportunity to authorize the operation during PowerScript execution.

Be aware that this allows execution of any script, so you do assume some risk by enabling this policy.

Once this has been done your test device is now able to install WinRT apps by executing the PowerShell script generated by Visual Studio.

Installing the App

On the test device you must have access to the contents of the package folder created by the developer in Visual Studio. You might get those files from a network share, a USB key, or other location.

Simply execute the Add-AppDevPackage.ps1 file in PowerShell to install the app.

The script will ask permission to run.

image

If this device does not have a side-loading unlock key (MAK or developer key), you will be asked if you want to get a developer key. You should answer yes and walk through the wizard to get a developer key for this device. This step will require you to enter your Microsoft Account email address and password. The resulting key will expire after a short period of time (currently three months).

The PowerShell script will then ask for permission to install the certificate for the app. If you’ve already installed the certificate (perhaps you are installing a newer version of the same app) the script will skip this step.

image

image

Once the certificate is installed, the script will install the WinRT app itself.

image

At this point the WinRT app is installed and its tile should appear on the start screen along with all other apps installed on this device.

The user may now run the app like any other app.

Once the developer key for this device expires the app will stop working. Obviously the intent of this installation approach isn’t for the user to run the app forever, but rather so they can test it and provide feedback during the development process.

Here’s the screen shot showing that Surface RT administrators can’t access the registry key necessary to enable unrestricted script execution.

image


Larry Louisiana (@LarryLouisila, a.k.a. Ely Bob) described Step by step deploying App[s] to Surface in a 12/19/2012 post:

imageMagenic recently gave out it’s Christmas present, so the first thing I did was try to deploy code to it.. here is how you can:

  1. Download the ARM version of Remote Tools for Visual Studio 2012 to your Surface (I believe that you’ll need to be running Windows 8 on your development machine). Install it.

     
  2. Have something to Deploy, I’m using the DirectX marble maze game sample from MSDN.
  3. On your Surface start the Visual Studio Remote Debugging monitor.

     
  4. You will need to know your Surface’s IP address I used “IP Address” by Jujuba Software (it’s free). [Hyperlink added.]

    Jujuba IP Address Screen Shot

    Once I Installed this, I opened it up and copied the IP that it displayed for my local IP address (put that in a .txt file on my desktop). You will need that for later.

  5. Once you have your IP address saved and aside open the Marble Maze solution in Visual Studio.
  6. Next go into the solution settings and Set your solution to ARM.

     
  7. Then go into the Project Settings and set your IP (local) and set it to ARM if those settings didn’t propagate)

     
  8. You’re almost there, Now just select Remote Debugging in the Debug Drop-down and click debug.

     
  9. If you’re using a machine attached to another Domain you’ll be asked to supply login credentials for your Surface. Otherwise you will just deploy normally. Your login credentials for your surface device are the machine name followed by your full live email, So for this example it would be Centepede\{me}@hotmail.com.
  10. If you don’t have [?] and once the package deploys (might take a while the first time to get all the references up to date on your Surface) You will see the Marble Maze Splash Screen. and if you go back to your desktop you will see:

Based 2[on] the original MSDN Blog.


Thursday, December 27, 2012

Running the SurveyApplicationCS Demo Project under Windows 8 RT on a Microsoft Surface RT Tablet

imageI (@rogerjenn) purchased a Microsoft Surface tablet for Windows RT on 12/22/2012 to test applications I that I planned to submit to the Windows Store after encountering the problems described in my Windows Azure Mobile Services Preview Walkthrough–Part 5: Distributing Your App From the Windows Store post of 9/22/2012.

In the meantime, I had encountered problems with running a demo SharePoint App (autohosted to Windows Azure) on a Google Nexus 7 tablet, as described in my Running the SurveyApplicationCS Demo Project under Android Jelly Bean 4.2 on a Google Nexus 7 Tablet post of 12/26/2012. This post provides a similar tour of of the demo project on my Surface RT tablet.


Launching IE from the “modern” (formerly “Metro”) UI, navigating to Oakleaf’s SharePoint Online Developer Edition site at https://oakleafsystems210.sharepoint.com, and signing in with your Windows Account (a.k.a. Live ID) if it isn’t cached, opens the following default page for authorized users:

image

(Click the images to open a full-sized, 1,366 x 768 pixel versions.)

OakLeaf’s LightSwitch HTML Client Preview 2: OakLeaf Contoso Survey Application Demo on Office 365 SharePoint Site, updated 12/26/2012, describes the application and provides a link to download its source code.

Tapping the SurveyApplicationCS link opens a splash screen and then the demo’s landing page:

image

Tapping an empty area in the screen to expose the Add button (obscured above by IE’s navigation bar) opens a new Product Survey form. Tapping the Customer text box opens a pick list of prebuilt customers:

image

Tapping other text boxes opens similar lists of products, shelf positioning, and a widget to enter the date/time of the survey.

Returning the the previous screen without tapping the Save button in the upper right corner opens an Unsaved Changes form:

image

Tapping a list item on the landing page opens a product survey details form:

image

Tapping the Photos button opens a Photos screen with tiled thumbnails of products:

image

Tapping a tile open a Photo Details screen which enables deleting a photo:

image

Tapping the Upload Photos button opens an Upload Photos form:

image

Tapping Browse displays a Files screen with a list of selections:

image

For this example, tap SkyDrive to enable the Open button and tap it to open SkyDrive’s screen for the logged in user and navigate to the folder containing appropriate images:

image

Tap the selected folder’s file to open an illustrated list of its images and tap to select the one to upload:

image

Tap the Open button to return to the Upload Photos screen with the Upload Control text box populated with the C:\Username\AppData\Local\Package… path and filename of the selected image downloaded from SkyDrive:

image

Wait for the file to upload, close the Upload Photos form, and display the added thumbnail:

image

If the thumbnail of the image you selected doesn’t appear, close the Upload Photos form and try again from the beginning. You might experience a program hang at this point, which will require restarting from the beginning (see Problem 1).


Problem 1: Photos don’t upload to SharePoint list storage from SkyDrive

Downloading photos from SkyDrive and uploading them to SharePoint list storage appears to be a brittle process. Uploads from my Nexus 7 fail consistently and from my Surface RT about 50% of the time. The problem might be related to the Bad Image URLs issue reported in my LightSwitch HTML Client Preview 2: OakLeaf Contoso Survey Application Demo on Office 365 SharePoint Site post.

Regardless of the cause of the problem, the indefinite program hang on closing the Upload Photos form needs fixing.

The Surface RT has a rear facing camera, so capturing product placement photos with it is practical. (The Nexus 7 only has a front-facing camera, which makes taking such photos impractical.)


Downloading OakLeaf’s SurveyApplicationCS Source Code

You can download the C# source code for the customized Visual Studio 2012 SurveyApplicationCS project here from my SkyDrive account. Click here for prerequisites.


Reviews of the Surface RT Tablet and Windows 8

imageC|Net News’ (@CNET) editors give the Surface RT Tablet a 3-1/2 star (Very Good) rating and 57 users rated it with about 4-3/4 stars, which must mean Excellent (49 users gave it 5 stars), in an Innovative tablet stranded in an app desert article updated on 10/23/2012:

image

Microsoft Surface is the best productivity tablet yet, and it had better be. As the only Microsoft-branded Windows RT hardware to launch with the new operating system (Windows 8 launches this week as well), the tablet serves as ambassador and flagship for the touch-focused, wildly risky Windows grand experiment. The Surface excels thanks to its thoughtful design, sensible implementation of its keyboard accessory, and the innovations brought about by the interface formerly known as "Metro" -- chief among them: the gesture-driven menu system, powerful search tool, and incredibly cool and versatile split-screen feature. …

I especially like access to the file system with File Explorer in Desktop mode and the ability to capture screens by pressing Ctrl+PrintScrn on a conventional keyboard.

Michael K. Campbell asserted “Windows 8 is the harbinger of things to come” in a deck for his Microsoft Windows 8 Isn't as Bad as the Fear Surrounding It article of 12/26/2012 for DevPro magazine:

imageOn one hand several usability experts and industry pundits have made it clear that they think Windows 8 has some serious problems. On the other hand, huge numbers of early Windows 8 adopters confess that even though there is a weird problem with the new OS having somewhat of a split personality, they actually think that it's a big improvement over Windows 7. Strangely enough, I think that both the early adopters and the pundits are right about their respective conclusions, even though that will take some explanation on my part.

Plenty to Love with Windows 8

As I mentioned in my article "Windows 8 for Luddites," I'm gradually working on the process of vetting a Windows 8 virtual machine (VM) for upgrade purposes. In doing so, I've found a lot to love even if I did have to jump through a few hoops to get there. However, the reality is that I was actually contemplating on skipping Windows 8. Despite this, I decided to take a look at the new OS because I saw a few early adopters that I follow on Twitter or interact with in newsgroups that kept saying great things about Window 8.

Although I do believe that Windows 8 does have a few weird problems, missing features, and capabilities, it's still not that bad. In fact, it's actually great in several different ways. Windows 8 isn't that much different from a typical Windows release in which we get some cool new features, and consequently we lose a few things that we used to love. Stated differently, not only can you make peace with Windows 8, but also you can actually find that it's a great upgrade.

Windows 8 is the Harbinger of Things to Come

Windows 8 is simply more than the latest version of Windows. It's also the harbinger of things to come -- a sneak peak of what could be the mind and will of Microsoft. With that mindset, there's plenty to be worried about when it comes to Windows 8. For example, the Windows Store, Windows 8's weird split personality, and its new focus on modern UI apps are something to be potentially worried about.

Personally, I'm not that worried about the Microsoft store aside from the fact that Apple is obviously doing insanely well with their store, which is something that I'm positive hasn't escaped Microsoft's attention. A recent joke makes it clear about how Microsoft seems to be heavily copying Apple: "Apple makes a phone, so does Microsoft; Apple makes a tablet, so does Microsoft; Apple makes an app store, so does Microsoft; Apple fires an exec, so does Microsoft." In other words, Microsoft needs to find different ways that they can generate revenue through the Windows Store.

Granted, there might be nothing to be worried about with Windows 8. The Windows Store might be a net win for Microsoft in the sense that it will offer consumers a new or different channel for putting software on their device. However, some larger game studios have already made it clear that they aren't happy with where the Windows Store is headed. As a result, it doesn't take too much imagination to see how something such as Microsoft's recent spat with Apple over SkyDrive subscriptions from the Apple Store couldn't play out in other uglier ways for PC software shops and developers. …

Sounds a bit like damnation by faint praise to me. Read more.


imageLindsey Turrentine (@lturrentine) rated Windows 8 #1 of C|Net’s Five Most Influential Tech Products of 2012 in her Galaxy S3 beats iPhone 5 for best device of 2012: CNET editors unveil the 10 best and most influential tech products of the year article of 12/11/2012 for C|Net News:

image

image1. Windows 8, the industry shaker
Love it or hate it, Windows 8 picked up the previously predictable world of desktop operating systems and shook it -- hard. The new operating system and its multiple iterations forced hardware manufacturers down the road to a completely different UI built around the startlingly different-looking interface. (What's the difference between Windows 8 and Windows RT? It's not an easy distinction.) Aimed at a touch-based experience, the new OS pleased some and launched an army of interesting new, convertible Windows laptops such as the popular Lenovo IdeaPad Yoga 13. But the OS also made many a user question the fate of the traditional Windows machine. (Read the full Windows 8 review.