Universal Windows App - Storing and Updating Data for multiple users - c#

I would like to be able to record some information about a specific user locally within my Universal Windows App, How would I go about doing this in such a way I can query the data after a period of time and pull back results? I have seen that this is possible using SQLite, is there any other technologies that could achieve this.
I would then also like to store some generic data such as click information on a database which would be updated by all users of the application.
Thanks for any help.

I think SQLite would be a great way to do it. However, if the data is simple enough, you can just store them using files. Use ApplicationData.Current.LocalFolder to access files specific for the user (or RoamingFolder, if you want this data to automatically roam between devices), and ApplicationData.Current.SharedLocalFolder to store data for all users on the device.

If you're going for things like click information,navigation and other usage data, I strongly suggest that you look into Application Insights. This is a very simple library that you more or less can just right-click to add to your project in Visual Studio. It will give you all sorts of telemetry right out of the box for your UWP apps, WebApps, and even Android/iOS apps. Think of it as the UWP version of Google Analytics, only so much better :)
You generally do nearly nothing other than to just configure it with an ID, but if you want to, you can track all sorts of custom events, and not worry about how to store them. Internally, Application Insights will send telemetry to Azure when it can. When it can't, it doesen't.
Here's the getting started page:
https://azure.microsoft.com/en-us/services/application-insights/

Related

Real User Monitoring for a C# Desktop App

I am looking a viable approach to record the usage / performance of various parts of a C# desktop application. I see strong parallels with the web focused Real User Monitoring technique and have access to Datadog to process my data.
Is RUM outside the web a viable approach? I believe I will have to implement the equivalent of the JS Datadog SDK if I want to go down this road, is there a way to do this out of the box?
I want to be able to track user usage for certain function calls and capturing exceptions seem sensible.
There are some event model disconnects between the desktop and web but RUM can be used with Android and iPhone apps as well. I implemented this using the json-schema files in the Android SDK and a bit of trial and error on how I wanted to map function calls into the RUM event model.

How to get location of multiple devices?

I am making an app that shows certain content to various devices. Basically I have the web app where I set what content to be shown and I used Xamarin to set a mirror of my content to all the devices I have.
Thing is, these devices will be given to drivers, and I need to see the location of those drivers. Is there a way for me to get the location of those devices from the web app? Not from the xamarin apps on the devices, the web app...
The basic architecture would have three components:
A central database to store location data.
In the Xamarin app, you will need to collect the location data and upload it to your database via a web service. Here is a Xamarin demo for location tracking.
Your web app will call a second web service on a schedule (every ten seconds, or whatever seems appropriate) to retrieve the location data for all drivers and plot it on whatever map you're using.
Unfortunately, there are many more details to unpack than can be contained in this answer. Firstly, a lot will depend on your technology choices for the central database and the web app.
You will also need to think about a few things regarding the tracking in your app. For example, battery impact of continuous tracking will be important. Also, you don't want to (or shouldn't) track your drivers at all times, but only when they are working. And so on.
I hope this can get you started.

C# Developing a Desktop Session Timer

I would like to get some suggestions for a project i am working on. Currently I have 12 computers joined to an AD domain using the same user to login to Windows 10 computers. I am trying to develop an app that will present a message and then log off the user at specified time. I actually have developed that app and for the most part it works. It even has the ability to allow an admin user to come over and change the time remaining. A new requirement has me a little stumped. The admin would like to login to a central computer and monitor the times of the 12 computers and be able to change the time from a central interface. So I am banging my head trying to brainstorm ideas. I decided to ask for help. Here is what I have come up with.
Client/Server App development. (would have to learn)
SQL table. Desktop app updates and pulls data (I would think that would be a lot of unnecessary traffic. Would have to determine how often that app Push/Pulls the data.
Update a local data file and have the Central Management push/pull to that file. Same idea as SQL?
Use a 3rd party app. (Costs and I also like to have flexibility and control)
Any suggestions would be great. I have no problem learning something new however this has unfortunately become a priority request so time management is important. For the most part I am looking for suggestions.
Thank you very much for your time. This is honestly my first "question post".

How to group apps in Metro in a similar way to a web app?

As a web developer, when I have multiple sites that are related by a common theme or common department, I have a home page that has links to the different sites. For example, there may be a site for reports (output to pdf or excel), another for inputting and editing sales data, and yet another for real-time tracking. Normally these links are in a header or sidebar which is static and can be accessed by all associated apps.
I'm reading about Metro/Modern apps now. I'll be trying to make my first Metro app soon. However, I'm wondering if it's possible to have (at least the illusion) of accessing 3 different apps through 1 app. So the user, just as in the web app, goes to one place.
If so, does anyone have any resources they can share?
To include multiple apps in the same frame they would need to all be part of the same app.
If you want links to jump between apps then you can create a protocol association to launch into the apps. This can include an arbitrary string so you can deep link rather than going just to the opening page.
On Windows 8.1 this connection is one-way: launching the protocol is fire-and-forget. The launching app doesn't get any feedback or results from the launched app.
Windows 10 adds the ability to return results to use the app as a service. I think this sounds more like what you are looking for.
See Auto-launching with file and URI associations on MSDN and the Build session App-to-App Communication: Building a Web of Apps
actually in Windows Universal app it's the same Approach. You got your app, and different pages where you could navigate back and forth... each page with it's unique look depending on your Need.
The user will open one app to Access all...
searching a bit in the net will Show you a lot of examples... Topic: Navigation, LiveCylcles, ...

Changes required in existing Web Application to access in Smart phones/Tablet computer

I have a ASP.NET Web Application. I want to access this application in Smart phones and tablet computer. So please help me on this. What are the changes required?
The answer to your question could range from nothing to everything. At the end of the day, it all depends on what you existing app looks like in a target mobile device (iPad, Android, etc). If your existing app looks and functions properly, then you don't have to do anything. If not, well, you figure out what's wrong and make it work.
Your question really isn't suited for StackOverflow because it is way to broad and impossible to answer.
Asp.net applications can run in web browsers, including the ones that come with smart phones and tablets. The main concern would be the various screen sizes of the various devices. Because they vary so much, a good design concept for your asp.net application would be to layout content in a way it can adapt to the screen size.
The best technology for this within an asp.net application, especially for an application that was already built, would be to implement style sheets (.css)
Look at these styles as an example:
float, clear, max-width and max-height
Check these and other styles at: http://www.w3schools.com/css/
Now, there is also the concept of having your asp.net application detect which device is being used and then generate UI code (or load .ascx controls) accordingly to provide device specific displays.
Check:
Request.Browser.IsMobileDevice
Request.UserAgent (http://msdn.microsoft.com/en-us/library/system.web.httprequest.useragent.aspx)
However, I would only suggest using this to a minimum, because if you make a change to your UI, you won’t want to keep updating multiple instances of the UI for different devices.
A good compromise would be to build a style sheet for each group of screen sizes (smart phone, tablet, PC, etc.) and then detect which device is in use and include the respective style sheet.
NB: there are many open source projects, which could get you running more quickly with mobile development in mind. Check sourceforge.net and codeplex.com for examples.

Categories