Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member202994
Discoverer

As Sanit Jain describes in his blog post here, User Centric IT is a key component in our efforts to make the work lives of our colleagues at SAP simpler. A part of this is the Feedback Shake, which has been in use in our iOS applications for nearly 3 years now (John Astill's blog here) – providing users with a quick and easy way to reach out to the app support team.

With Windows 10 Mobile devices soon coming to SAP colleagues, I took up a side project of implementing this for Windows 10 devices using the Universal Windows Platform (UWP). UWP is unique because it enables developers to create apps that run on all Windows 10 devices – from desktop to mobile, and even Xboxes. While I am not sure if SAP will support corporate Xbox devices anytime soon (break room gaming anyone? :lol: ), the key component for the enterprise world is the ability to develop one app capable of running on both on desktop and mobile devices.

As part of UWP, Microsoft provides a common API layer - while also still providing more specific API layers for specific devices like desktop or mobile. The common API layer is what allows developers to target such a wide range of devices.

Functionally, the Feedback Shake for Windows 10 is almost exactly like the iOS implementation. On the technical side, taking a screenshots, creating log files and sharing each work a little differently.

Check out the source code on GitHub here. The XAML/C# code in the repository demonstrates some useful code:

  • Taking a screenshot of the current view and rendering it to a Bitmap
  • Animating a control using XAML Storyboards
  • Gathering hardware/device info
  • Enabling the accelerometer and listening for shakes
  • Composing an e-mail in code from the app, with attachments
  • Simple logging and writing these logs to a file

Well how does the app look? Upon starting you will be presented with this initial screen, simply prompting you to shake the app:

App running on Windows 10 mobile device

App running on a Windows 10 desktop device

Notice that if you are running the app on a device without an accelerometer, such as a PC, a button appears that can be tapped to send feedback instead of shaking the device. Such a button can be incorporated nicely into the UI of a production app.

If the user shakes the device or taps the feedback button, the following page appears:

Much like the iOS version, this screen shows a wiggling phone icon, some helpful text to the user, and several buttons to:

  • Send a feedback email
  • Share the app with firends
  • Dismiss the prompt

Send Feedback

Tapping this button will compose an e-mail message, attaching the log file & screenshot, and finally opens the Outlook app for the user to provide more details.

In addition to the attachments, some device info is provided for the support team – important troubleshooting info like app version, OS version, device model, etc. This extra info helps the support team accurately help the end user with their issue.

Share with Friends

Back on the feedback screen, the user also has the option to share the app. Using the UWP share contract, the app provides a HTML file that can be shared with a variety of other apps, like Outlook.

The app was created using Visual Studio Community 2015. You can build & deploy the project on Windows 8.1, but you must have Windows 10 in order to deploy to your local machine or have all IDE functions available. Thanks for reading!