Mobile devices

V

Vince

Hi,

I've been a ASP.NET C# developer for sometime now, but I have an idea
that Id like to see work on a mobile device. So I have a couple of
questions as I'd like to use Microsoft products to build it.

Firstly, seeing there are many mobile/smart devices on the market, how
does one go about building a website that will display properly on
them all. For desktop computers, all you have to really worry about is
IE, FF, Opera and Safari, which isn't that many. There are most
probably over a hundred different mobile devices on the market and I
can't see myself purchasing them all to do my test runs. At most I
would purchase two.

Would it be better for me to develop an application thats installed
onto the device via the web rather than a website? I need access to
the devices GPS capabilities.

One last thing, does Microsoft provide any libraries that support GPS
or will I need to do the maths on my own?

Thanks in advance.
Vince
 
S

Simon Hart [MVP]

I'm not a "web" guy so someone else might be able to chip in with some
foresight. But generally the rule is to develop a separate site for mobile
devices that are designed for a particular screen size which then scales to
the screen. Usually this size will be 320x240.

Something like the following will allow you to redirect to a separate set of
pages for mobility on your ASP.NET server side code:

if (Request.Browser["IsMobileDevice"] == "true" )
{
Response.Redirect("MobileDefault.aspx");
}
else
{
Response.Redirect("DesktopDefault.aspx");
}

I believe ASP.NET has a separate set of mobility ASP.NET controls which you
can use which replaced to old Microsoft Internet Toolkit or what ever it was
called.
 
D

dbgrick

The IsMobileDevice property for the browser does not always return the
correct value. You should consider parsing the User Agent returened fromt he
mobile device. Windows Mobile devices usually contain Windows CE in the User
Agent and Blackberry device containt he text Blackberry. Based on these and
other values, that you should research on the internet, you can determine if
the device is a mobile device. You're are usually ok with 320x240, but
remember that there are other device screen sizes. You can sometimes
retrieve this from the user agent as well. I'd say experiment with different
devices and/or emulators and see what works best for you.

regards,
Rick Davis
DBG Software

Simon Hart said:
I'm not a "web" guy so someone else might be able to chip in with some
foresight. But generally the rule is to develop a separate site for mobile
devices that are designed for a particular screen size which then scales to
the screen. Usually this size will be 320x240.

Something like the following will allow you to redirect to a separate set of
pages for mobility on your ASP.NET server side code:

if (Request.Browser["IsMobileDevice"] == "true" )
{
Response.Redirect("MobileDefault.aspx");
}
else
{
Response.Redirect("DesktopDefault.aspx");
}

I believe ASP.NET has a separate set of mobility ASP.NET controls which you
can use which replaced to old Microsoft Internet Toolkit or what ever it was
called.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


Vince said:
Hi,

I've been a ASP.NET C# developer for sometime now, but I have an idea
that Id like to see work on a mobile device. So I have a couple of
questions as I'd like to use Microsoft products to build it.

Firstly, seeing there are many mobile/smart devices on the market, how
does one go about building a website that will display properly on
them all. For desktop computers, all you have to really worry about is
IE, FF, Opera and Safari, which isn't that many. There are most
probably over a hundred different mobile devices on the market and I
can't see myself purchasing them all to do my test runs. At most I
would purchase two.

Would it be better for me to develop an application thats installed
onto the device via the web rather than a website? I need access to
the devices GPS capabilities.

One last thing, does Microsoft provide any libraries that support GPS
or will I need to do the maths on my own?

Thanks in advance.
Vince
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top