Differentiate between different devices - c#

How do we differentiate between the following devices in ASP.NET (C#)?
Mobile
Desktop PC
Tablet
E-Reader
I am pretty new to making mobile websites, but I have always made sure existing sites work great on mobile devices. The problem I face now is that I actually need to make different versions for all these devices, and I have not been able to do much research on this as there appears to be not much information that I can find regarding this issue.
The only things that popup are things like Mobile website generators etc. Definitely not what I'm looking for.

You must look at responsive design templates, it is suggested by many because it is always hard to adapt the website according to each device.

Related

Android Game Pad Feasibility

So, I have seen various posts regarding the use of an android phone as a keyboard and as a game pad. I'm actually working on a project that does just that. As you could imagine, I've hit a massive roadblock when it comes to sending the signal from the phone to the PC via USB.
I decided to use unity as the base of this project. I have a functioning GUI and I have some simple code to basically open the port, push through the Serial.write command, and close the port. I also understand that is code will not do me any good without the PC I'm connected to via USB recognizes the phone as a source of input.
That's where I'm stuck.
I've seen posts that involve explanations of how USB works, the different hex codes mapped to keys, ideas of modifying the kernel, third party programs, and third party devices, but nothing concrete on how to move forward in a video game on my PC by simply tapping the screen on my phone. It should be simple right?
So, I'm asking whether or not this project is worth pursuing for the few months I have left to do it or should I consider pivoting to a project that's a little closer to my pay grade(free)?
Although I am not sure if this post is a SO standard question, my train of thought would be to use bluetooth instead of using USB, client-server etc. as they are plagued by problems. While there maybe a certain lag in using bluetooth, programmatically this should be easily achievable. This maybe of interest to you: https://github.com/temach/HIDInterface

Small server application

I'm interested in programming a small server app that I can use to convert an old laptop into a home server. I don't think it needs to be too complex, I just want to be able to download my music and such onto other devices. My questions are:
Could I do something like this in C#?
Is it possible to set it up in a way that I can connect my mobile devices to transfer pictures and music?
Are there any references that might help me with this? (Books, articles, etc.)?
I'm fresh out of school so my experience is minimal, so I'm sorry if these questions seem obvious. Also, my mobile devices are all Android, two of my PCs run Windows 10, and the one I want to act as the server runs Windows 7, but I can upgrade that if it will simplify things. Again, sorry if the questions are a little basic and thanks for taking the time to read.

How to access camera on a windows tablet or attached web cams using Windows Form Application (Not WPF)?

I am trying to develop a Windows Form Application (not WPF) where I would require to preview numbers of cameras available on a tablet or PC, take pictures and then save the pictures in the device.
I am very new to this kind of application development and recently came accross Media Capture but I can not find a good lead to start with.
Can anyone let me know how to approach or how can I build the application with the aforementioned features or provide a good lead??
P.S. Found a good example on https://code.msdn.microsoft.com/windowsapps/media-capture-sample-adf87622/ but it uses XML not the Win Form Application type.....
What kind of cameras do you have? If the cameras support onvif, then there is a good onvif camera software you could try. You can handle many cameras with it, you can take snapshots so I guess it could work for you.

how to send and read SMS from mobile attached to PC

I am building a Windows Desktop software that will respond to SMS request and sending a SMS as reply automatically.
The software is ready and working just fine but it works only and only with Nokia Mobiles and the prerequisite is that Nokia's PC Suit has to be installed first before my app can work.
But now my customer wants to change his mobile so he wants me to change programming so that it works with any mobile.
I am at loss as to how to do this?
Can someone please help me here. I am ready to recode the whole app if required.
My preferred platforms are Delphi, VB.NET and VB6.
There are extended AT commands that you can send to your phone's virtual serial interface that tend to work well on many phones. See this for more info: http://www.developershome.com/sms/howToSendSMSFromPC.asp
Now all you need to do is find serial drivers for the supported phones. This used to be really simple, but is harder these days. Bottom line is, it is probably your best option.
"Any mobile"? That's a tall order. I'm not sure your customer knows what he's asking for. Different types of phones are different and there isn't some way to make the same program run on all of them.
What you can do, though, is make it run on any supported mobile. You can keep most of your existing PC-side code; only the part that talks to the phone has to change. Encapsulate that into some sort of interface in a separate module, and that's your specific code for talking to Nokia phones. Your app now supports Nokia.
Then figure out how to do the same thing for an Android, or a Blackberry or an iPhone. Build those specific parts into their own modules that all implement the same basic interface. With each new phone type you figure out how to talk to, your list of supported devices will grow.

Tips for designing web pages for mobile browser?

I'm making my debut in designing a web app specifically targeted at mobile browsers. While I've written web pages before in C#/ASP.NET, I've never done anything specifically for the limited screen real estate and other idiosyncrasies of mobile browsers. So I'm looking for some pointers here:
What design considerations should I be taking account of (aside from the obviously smaller screen)?
What useful features are there in C# that can be put to good effect for the mobile client?
How do you make sure to give a relatively uniform user experience for all different mobile browsers?
Any other tips you have?
Thanks!
Probably obvious but make sure you define a bespoke handheld stylesheet.
<link rel="stylesheet" href="http://domain.tld/mobile.css" type="text/css" media="handheld" />
Whilst modern smartphones (e.g. iPhone) can handle normal sites the constant zooming in and out is better avoided for a dedicated mobile app. However, it's worth designing two versions in case the user wants to access the app using a laptop / desktop too.
What design considerations should I be
taking account of (aside from the
obviously smaller screen)?
How about the user interaction, for example there are few devices that allow for "hovering", so don't depend on psuedo-classes that cannot be emulated on a mobile device, but don't completely ignore them, so mobile devices may use them.
Think about orientation of the design, if the device supports landscape and horizontal viewing.
Some devices like the iPhone cannot be operated to a mm accuracy using a stylus, so don't make inputs dangerously small.
If using effects to tart up the UI, most mobile devices don't display effect (such as those provided by jQuery) very well...
Finally test, test, test! Test on as many real mobile devices you can, and when you're done consider using emulators (such as ones for BlackBerrys or the iPhone), whilst this won't provide you with the feel of using the device, it should show any rendering problems.
Making a good mobile device experience is mostly about the UI, and not the back end application.
Use a mobile device style sheet (media="handheld" attribute on the link-element)
Have as few HTTP-requests as possible:
Compress all scripts and stylesheets into one single file (one for .js, one for .css, that is)
As few images as possible
Keep in mind the differences between touch devices and non-touch devices (size of buttons, for example)
Be careful with the amount of content you fit into one page.
Compress, minifying, optimize for a couple of reasons. Bandwidth isn't great, a page that loads in a couple of seconds on the desktop could take 30+ seconds on a mobile device. Caching is really poor on mobiles. An example being the iPhone will not cache components of a website over 25k. So get your images, scripts, stylesheets as small as possible.
You should check out WURFL which basically is a huge xml file that helps you identify the device. You grab the user agent and check it against the file with their API to get all the capabilities and features for that device. I´ve used it in numerous projects with great success.
Don't redirect to the mobile version of the site, losing the intended target. If I want to view an article on a site, don't take me to the mobile home page. You may take me to the mobile view of the article, but hijacking my target entirely is unacceptable.
A certain cr***ed.com does this always which is incredibly infuriating....

Categories

Resources