How to detect Tablets in ASP.NET MVC Application - asp.net-mvc

In ASP.NET MVC application how can I detect whether the user is using the Tablet device or the Mobile device?
Please I am looking for a no media queries solution.

There is nothing built-in for ASP.Net (you can test Request.UserAgent, but you need to know more info about specific device), you could detect the device client-side(with the help of something like web.wurfl.io) then parametrize your controllers, otherwise, if you are looking for a pure server-side solution, you could try WURFL => Wireless Universal Resource FiLe
WURFL is a Device Description Repository (DDR), i.e. a framework that
enables applications to map HTTP requests to a description of the
capability of the mobile device that requests the page. In this
regard, WURFL pre-dates the time when the DDR term was coined and
could arguably be caracterized as the first DDR. In the last year,
WURFL role has expended from being a DDR for mobile devices to being a
framework to detect every HTTP client worth recognizing.
Thanks to WURFL, mobile web sites and application can:
programmatically abstract away devices differences
avoid the need to modify applications whenever a new device ships
avoid the need to track new devices on the market
WURFL is a global database of all devices and the API to tap that
information programmatically.

Related

Checking fake gps on Sap Fiori Client App

I have a Sapui5 application that runs on Sap Fiori Client App. This application uses user's location and on Andriod its very easy to fake your Gps. It there any way to detect mock gps usage on Sap Fiori Client App?
Best Regards.
Since your application runs in an Android app and not as a native app you are not on the right level to have access to the systems settings. When developing an Android app you have some options to accomplish the detection of fake GPS (i.e Location.isFromMockProvider()).
For more information (Android):
https://stackoverflow.com/a/41538070/8194384
In your case the devs of the SAP Fiori Client App have to implement that feature and make it available in Fiori apps.
Alternatively you can implement a custom plausibility check to validate the GPS locations. Since SAP apps are only used in business context there should be limited scenarios that are credible. I.e: A Pokemon Go player has a "valid" reason to fake his location to be New York. I doubt that your service staff or sales reps has such motivations.
And for general considerations:
Is such a check really necessary and requested from the business? If yes, it would be their task to define what is plausible/credible and what not.

How to de-duplicate notifications between native and progressive web app?

If I have both a native app and a progressive web app using web push notifications powered by service worker, is there a way to prevent a user from receiving duplicate notifications if they opt in to receiving notifications from the web site and also have the app installed?
In short - there is no easy way to do this today.
There is a discussion on Chrome here on this: https://code.google.com/p/chromium/issues/detail?id=402223
The last comment from October 2015:
For now the safest minimal solution is for sites to provide an easy
opt out mechanism (which we strongly recommend you do anyway!) so
users can turn off notifications from one platform
Another possible heuristic based solution is to take some measure for
which interface (web or native) the user most often uses (or most
recently used) and only send to that. Combined with grouping these
devices by rough screen size should give a pretty good approximation.
The issue is that if the user has two similar sized devices and uses
native on one and web on the other then notifications will only be
delivered to one, which is an edge case.
We've also been discussing building an API so sites can tell whether
their corresponding native app is installed to avoid this case, but
need to start discussing that with other browser vendors to see if
they'd be supportive.

Combine iOS and Web analytics

I am using Google analytics for my Web application and iOS application.
iOS application is practically an equivalent of its Web counterpart (they have same views, same functionalities).
I would like to have a combined report analyzing usage of both iOS and Web app together.
That means sum of all pageviews, tracking user's actions...
Quantcast Measure is designed for cross platform (web and mobile app) audience measurement. It has both a web SDK and a mobile app SDK that allows to to combine your web and app audiences into one comprehensive report. Quantcast's profile of GoodReads is a good example of what it's cross platform reporting is about.
(Full Disclosure: I work at Quantcast)
Forget about your mobile application, just create a responsive design version of your web app.
You will still be able to determine what traffic comes from Mobile devices.

Is it possible to get a unique identifier for an ios device from a browser, in a controlled environment?

This is (a very simplified version of) the scenario with which I am faced:
I have an existing web application which manages jobs. We are now purchasing a number of ios devices (iphones and ipads) and I need the web application to know which specific device (regardless of the user) is updating information through the web application (as well as getting the GPS co-ordinates, but I think I have that covered with the geolocation API).
I have control of all the devices, they will all come to me before being distributed and will return to me periodically, so I can modify/restrict etc., but I can't jailbreak.
I have no experience of ios, but if there is a way to do this without needing an app, that would be the best choice.
You can use HTML5 storage to create and save a GUID the first time user accesses your website and send it with subsequent requests.

Stuck at making decision between native app or web app

I'm currently graduating at a small company which makes and sells accounting software.
My task during my graduation is to make a Mobile application which supports some functionality of this software.
For instance: making a report on site and uploading it to the server,logging hours worked, retrieving sales information etc..
I'm currently doing research on which platform I should deploy but I'm getting confused in what shape my application should be made.
I can't make a choice what I should recommend, Web app or Native app?
I need help making a recommendation:
Security is important. (we deal with confidential information)
Maintenance is very important. (they will have to support it in the future and have low resources available. (small company))
Development costs (I have no clue here.)
User experience (Because this is a business app, is a web app good enough?)
The business market here is currently very iOS (Apple) saturated (about 80%) but I do need to think of the future. (Android, WP7)
So What do u recommend with the given information, web or native? Do I need more information before making a decision / recommendation if so, what sort of information?
ps I think this question belongs on stackoverflow, if not please move it to the appropriate site.
For what you're looking to accomplish, I'd recommend taking the mobile web app route. Here's why:
Security is important. (we deal with confidential information)
You could make a case either way, but I feel that a mobile web app is better for security. Like Ganzolo said, it can have as much security as a typical web app. Also, since it doesn't store data on the device itself, you won't have to worry about a data breach in the event of a lost or stolen phone (assuming you're not using HTML5 offline storage).
Maintenance is very important. (they will have to support it in the future and have low resources available. (small company))
Mobile web apps have an advantage here. If you built native apps, you'd have to build and maintain separate apps for each platform. On the other hand, since one mobile web app reaches all platforms, you'd only ever have to maintain one app. Also, you won't have to update a mobile web app with each OS update, like you would with a native app. If you want to go one step further, you could even build a mobile web app with separate presentation layers for smartphones, tablet, and PCs (like this). That way, one mobile app would look different (yet native) on any device, but you'd only have to maintain one underlying application.
Development costs (I have no clue here.)
Depends on how many platforms you want to reach. If you're building for one platform, the costs are similar. If you're building for multiple platforms, mobile web apps are far cheaper. One mobile web app reaches all platforms, whereas you'd have to build a separate native app for each platform.
User experience (Because this is a business app, is a web app good enough?)
You'll get a better UI with a native app, but a mobile web app should be more than sufficient for most business apps. Use a good mobile framework (like jQuery Mobile), and you can build a mobile web app that looks and feels almost native.
The business market here is currently very iOS (Apple) saturated (about 80%) but I do need to think of the future. (Android, WP7)
Mobile web apps are a much safer choice for the future. Who knows what the mobile platform landscape will look like in 2 or 3 years? Maybe WP7 will be popular. Maybe some new OS will be popular. It changes so fast, there's no way to know. The only thing I do know is this: The web will still be popular. If you build a mobile web app, you insulate yourself from all future mobile OS battles.
I hope that helps.
My personal opinion would be to go for a web App :
• Security is important. (we deal with confidential information)
Sercurity in a web app cannot be worse than security in a regular website (like online banking)
• Maintenance is very important. (they will have to support it in the
future and have low resources available. (small company))
Maintenance is really easy for a web app since you can make updates without going through the process of submitting your app to the store and waiting.
• Development costs (I have no clue here.)
Development cost will be lower with a web app as you'll have 1 code for every phones (and most of them are using webkit which will be simplier)
• User experience (Because this is a business app, is a web app good
enough?)
It's hard to answer this question without knowing your project but for simple UI it can be good enough
• The business market here is currently very iOS (Apple) saturated
(about 80%) but I do need to think of the future. (Android, WP7)
Yes you need to think about the future that the most important because you can only do simple functionality in web apps. So if future requirement, will have more complex functionality then you'll have to move into native apps.
Hope I've been helpful
In my experience, web apps always tend to be sluggish on the UI front. I would always opt for a native app, if you don't have to support multiple platforms at once (iOS, Android, generic).
Security: Make your app connections over SSL
Maintenance: The only problem here is that you may have to wait 7 days for App Store approval for native apps
Development costs: Depends on who makes the app, shouldn't be too different.
UX: Defenitely native!
Multiplatform: As I said, for multi platform a web app is probably best
If you opt for a web app, make sure the user doesn't have the impression of "the app isn't doing anything" while loading stuff.

Resources