Help for a beginner developer - Windows Mobile Software Development

Hi all, I've been using this forum for a few years and it's fantastic!
Anyway, I'm at University studying Network Management and this year I have to write my dissertation; a final year project.
For this, I've chosen to learn how to write and develop windows mobile applications and to develop an application that will update a user's facebook status with a URL to Google Maps, showing their location.
Now I've seen applications that can e-mail a URL of a google maps location but never one that integrates with Facebook..
Could anyone offer me some advice on where to start with WM development and any tips on writing the program I intend to create? I have a copy of Visual Studio and have a tiny bit of experience programming C++.
Any input is much appreciated! Thanks very much
Jamie

If your app is web driven, which it sounds like it is, drop the C++ and move straight to C# .NET. You can use C++ with the .NET CF framework but the casts one has use in order to get it to work, make the code hideously unreadable. C# is far more more appropriate.
Web .NET objects are quite easy to use, the problem appears when you try to decide exactly which object/class you require, then which of its properties to set, and then which of its methods to use to get it do what you want, the latter being further confused by which of its overloaded methods you should use. To summarize, the .NET CF framework is incredibly powerful, but at times confusing to the point of distraction, as there are several ways to do the same thing.

stephj said:
If your app is web driven, which it sounds like it is, drop the C++ and move straight to C# .NET. You can use C++ with the .NET CF framework but the casts one has use in order to get it to work, make the code hideously unreadable. C# is far more more appropriate.
Web .NET objects are quite easy to use, the problem appears when you try to decide exactly which object/class you require, then which of its properties to set, and then which of its methods to use to get it do what you want, the latter being further confused by which of its overloaded methods you should use. To summarize, the .NET CF framework is incredibly powerful, but at times confusing to the point of distraction, as there are several ways to do the same thing.
Click to expand...
Click to collapse
Agreed.
I just started with an C++ service. I'm getting there but man o man.

Related

C# + SMS (counting out going)

hi guys, this is normally the best place i have found information, so thought i'd ask you lot..
i've have decided to teach my self programming for windows mobile, seems best (easiest) way to start is with c#..
my first attempt will be sms counter (in/out going) same with call times, based around contract period, also my be a blocker for both sms and calls..
yes i know there are lots of apps for this already, but how else will i learn..
doing my research, i have found out that c# itself can't access the phone to hang up calls, but i have found a tapi wrapper that does. I have also read that c# cant access outgoing sms from other apps (to create a counter, or even block outgoing to some/all numbers), but can access incoming. is there a simular wrapper for sms?
or would i be better off just learning c++?
Hmmm, well I would personally recommend that you just go ahead and learn C++ because what you will find with C# is a couple of things:
1-It is slower because it has to load up multiple DLL's to run (.net CF)
2-It is harder to code better programs because the functions are limited
3-In the end, to get the better programs you will just be P\Invoking a lot of C++ based functions.
So in the long run, for efficiency, for programability, and for conveneinece, it seems like C++ would be the better way to go.
Hope this helps
cheers, makes sense.. i might carry on with what i'm doing in c#, finish something off before start something new..
what resources would you recomend to someone starting out in c++ for windows mobile?
stuff i read (mobile programmers hand book, step by step c# and visual basic) don't really teach me way i learn, hard to explain, but wasn't impressed with them.. for example i taught myself basic PHP and MySQL, by having a idea and trying to do it, if i can't google it till i can, not by having some code and editing it as in them books, want a book/tutorial that goes from the beging of a program.
hope that makes sense, off to hunt for c++ then lol
I totally understand what you are saying Frosty....
I have yet to really learn C++ because all the tutorials and manuals i get are not very good (or I don't seem them as good at least).
I guess the best place to start, is to download the SDK (i dl'ed both pro and standard) and analyze the examples! That is how I learn, I just gotta look at code and follow it, and eventually I figure some of it out.
It wouldn't hurt to google up function calls and some other stuffs too...
If there is someone who is adept at C++, could they explain to me how C++ documentation works? I find it is VERY hard to find decent documentation for C++ ... (Hence why i started with C# ... i found more docs on that).
I found http://www.functionx.com/win32/ before, thought it was quite good, but haven't some anything simular for WinMo. there really is little documention about for beginers
followed http://msdn.microsoft.com/en-us/library/bb158526.aspx (basic hello world) 272 lines in just the main source file! but no step by step to explain everything.. time to struggle along lol

Simple Progrqamming Languages/environment ????

I want to program simple applications, one or two screens, a few input boxes, simple graphics, display the output. Compile to an .exe. I "sorta" program, I can do a lot in Excel VBA, can't do C++ never tried Java or others.
Are there any easy to use programing languages (and environments) that would do what I need?
I look forward to you insight.
Nick
.net IDE
maybe get a copy of visual studio, it's pretty easy to create a simple forms app in VB.net or c# with it.
Thanks for the reply...
Do you need "Visual Studio"? Or will Visual Basic 2008 work?
Are there free Visual Studio versions? If so, I haven't found the right link yet.
Nick
C++ and Java are similar and easy to pick up, and java is even based off c++, personally I use codeblocks as my IDE, but there are many others to choose from
nkemp said:
I want to program simple applications, one or two screens, a few input boxes, simple graphics, display the output. Compile to an .exe. I "sorta" program, I can do a lot in Excel VBA, can't do C++ never tried Java or others.
Are there any easy to use programing languages (and environments) that would do what I need?
I look forward to you insight.
Nick
Click to expand...
Click to collapse
There has been a lot of question on how to program lately.
Before asking, please:
1) Do a search on the forums
2) Look at the sticky in the front of the forum. There is plenty of information on programming in the Wiki pages.
Good luck!
nkemp said:
Thanks for the reply...
Do you need "Visual Studio"? Or will Visual Basic 2008 work?
Are there free Visual Studio versions? If so, I haven't found the right link yet.
Nick
Click to expand...
Click to collapse
The free version is called Visual Studio Express
[Not allowed to insert links]
Go to: microsoft.com/express/Downloads
Search for Basic4PPC and try it. It has a similar interface to VS and much cheaper (there's a demo you can download so you can try out for yourself.) The language is similar to VB. The end result is an application written using Compact Net Framework.
Good luck
Thanks for the help folks ...
There area a lot of options listed in the sticky but the problem is that there is no evaluation of ease of use.
- I did download basic4ppc and it seems easy enough to use ... for a fee
- but you don't know that until you download (unless you click through to the wiki)
- I downloaded SharpDevelop but have not been able to figure out the code (poor documentation and dead links to things like the C# book)
- Next I'll try FBA Creator
Nick
Later ..... So I tried FBACreator and a lot simpler ... but no no way to graphically design the screen like basic4ppc or SharpDevelop.

Beginner Programming: Custom UI Question

I'm preparing to start a little side project, I have only very basic programming experience so I think I'm going to go with Visual Basic for the application.
What I'm having trouble with learning, is where to go to implement a custom UI if I'm not satisifed with the standard .net controls.
For example, how would I create a custom button control with my own images?
I'm struggling to find any windows mobile development tutorials around UI. Any ideas where to start looking and learning from?
I found a few links that should be useful after all:
http://msdn.microsoft.com/en-us/library/dd630622.aspx
http://msdn.microsoft.com/en-us/library/aa446518.aspx#imagebutton_topic3
http://expression.microsoft.com/en-us/dd279543.aspx
Still open suggestions or tips for a beginner though if you have any, thanks!
Don't use VB, use C#
Most examples snippets in open source I use are in c#. VB is just as good but ..
Search for UI in the WiMo forum. I opened some topics about UI also and with some answers I submitted there are some links in this forum for you to use.
Search for Sense SDK, fluid for a free UI or use controls from beemobile, resco, or myrabyte.
ajhvdb said:
Don't use VB, use C#
Most examples snippets in open source I use are in c#. VB is just as good but ..
Search for UI in the WiMo forum. I opened some topics about UI also and with some answers I submitted there are some links in this forum for you to use.
Search for Sense SDK, fluid for a free UI or use controls from beemobile, resco, or myrabyte.
Click to expand...
Click to collapse
Thank you for those tips. I've seen fluid and the Sense SDK in my searches, I'll be sure to give those a go. As it's just a small hobby, I probably won't go with the beemobile, resco route, but thank you for the suggestion.
I keep debating about diving into C# rather than VB, I'm just not sure I can devote the time to get anywhere with it. It seems a bit more complex to understand. VB is already fairly familiar with me and easy enough to learn more about. I also heard that we'll be able to use VB at some point for WP7S development, so that I wouldn't lose any knowledge learned here if I wanted to give WP7S a shot. At the moment WP7S development is C# only however....maybe another reason for me to change my mind...

Simple programming tutorial?

Hi all. Im looking to develop my first app. Its for Touch Pro 2 running WM 6.5.
I want the app to perform the following simple mathmatical calculations:
a=manually entered number between 2 and 20
1) a*200=b
2) b*40%=c
3) b*20%=d
4) b*15%=e
5) b*10%=f
6) b*8%=g
7) b*7%=h
The program would allow me to enter 'a' into a text box. It would then calculate and report calculations 'b'-'h'.
I understand that this can be very simply accomplished using Pocket Excel, however Im hoping to create a nice simple GUI for the program. Im not asking anyone to create the app for me, just to point me in the direction of some relevant tutorials.
Cheers all
It would help if you told us what Language you are aiming to use
Not a clue. Never programmed before. Was hoping this might be a nice simple starter app. Any recommendations on which is the best language to use for what I want the app to do?
I started with C# and it's pretty easy to learn. There's a ton of tutorials for C# programming at msdn.com both for desktop and mobile applications.
Beginner Development Series (intro, tutoirials, videos, etc): http://msdn.microsoft.com/en-us/beginner/dd435692.aspx
WinMo Rampup (helps to have programming basic knowledge): http://msdn.microsoft.com/en-us/rampup/dd807370.aspx
WinMo Developer Center (download SDKs, forums, etc.): http://msdn.microsoft.com/en-us/windowsmobile/default.aspx
Enjoy!!!
I agree that C# is a very easy to learn language for people enterring the developing 'world'.
I started by learning C#, however, as helpful as it was in terms of understanding coding, I do regret starting with it. I personally feel, learning from my 'mistake', that learning C++ would have been a greater thing to do FIRST. It is a large jump to go from little/no knowledge to C++ coding, but in the long run, C++ is faster on Mobile Phones because it doesn't have to load up the same dependencies that the .NET CF has to.
If you were to want to learn a language for both PC AND Windows Mobile/CE, then C# is MOST DEFINITELY the way to go, since it has DECENT speeds on Mobile devices, and speeds good enough for most tasks on PCs.
Thats just my 2 cents. And if you ever need any help with C#, feel free to contact me. Look at some of the apps I have made, and if any of them interest you, PM me about the source, I may be able to help you out!
Thanks for the advice guys. Im going to take a look into both of the suggestions and see if I can have a bit of fun.
@Cyclone.... I will certainly take a look at some of the apps you have created, and the point that you brought up about programming for both desktop and mobile has interest for me.
Thanks again for the responses guys.
Why would you program an app like that? don't you have an calculator?!
but it is really easy and you only need the very basic operations. use float datatypes and remember that 15% of X is (x/100)*15 and you are done
'If you use the MS Visual Studio Express 2008 you get a visual gui designer.
greetz
use Excel , its more simple for your job
Cyclonezephyrxz7 said:
I agree that C# is a very easy to learn language for people enterring the developing 'world'.
I started by learning C#, however, as helpful as it was in terms of understanding coding, I do regret starting with it. I personally feel, learning from my 'mistake', that learning C++ would have been a greater thing to do FIRST. It is a large jump to go from little/no knowledge to C++ coding, but in the long run, C++ is faster on Mobile Phones because it doesn't have to load up the same dependencies that the .NET CF has to.
If you were to want to learn a language for both PC AND Windows Mobile/CE, then C# is MOST DEFINITELY the way to go, since it has DECENT speeds on Mobile devices, and speeds good enough for most tasks on PCs.
Thats just my 2 cents. And if you ever need any help with C#, feel free to contact me. Look at some of the apps I have made, and if any of them interest you, PM me about the source, I may be able to help you out!
Click to expand...
Click to collapse
+1 on this. C# is very easy to learn, but now I'm having some areas that the .NETCF doesn't cover so I'm in the process of learning C++. And I can def say it would have been a big leap to start with C++, but it makes a great foundation to learn other languages, cuz you know what's going on "behind the scenes" so to speak.
Having that been said, if anyone is in the learning process of C++ and would like some assistance, you can contact me, and I will be glad to try ot help where I can (Maybe we can learn something from eachother haha).
But yeah, I am re-doing my Fake FingerPrint Lockscreen app in C++, and it runs SO MUCH MORE SMOOTHLY! Not even kidding, I made a build that goes on my SmartPhone (non-touch) and everything just looks better! So really, do consider C++...
brandi said:
Why would you program an app like that? don't you have an calculator?!
but it is really easy and you only need the very basic operations. use float datatypes and remember that 15% of X is (x/100)*15 and you are done
'If you use the MS Visual Studio Express 2008 you get a visual gui designer.
greetz
Click to expand...
Click to collapse
You can't develop for Windows Mobile 6.x using the free (Express) Visual Studio versions! (i.e. a commercial one or SharpDevelop)
And I recommend starting with C#.
(When you're at the point that you think C#.net is too slow then either you're still learning or you'll be experienced enough to change to C++ easily. )
Cyclonezephyrxz7 said:
Having that been said, if anyone is in the learning process of C++ and would like some assistance, you can contact me, and I will be glad to try ot help where I can (Maybe we can learn something from eachother haha).
But yeah, I am re-doing my Fake FingerPrint Lockscreen app in C++, and it runs SO MUCH MORE SMOOTHLY! Not even kidding, I made a build that goes on my SmartPhone (non-touch) and everything just looks better! So really, do consider C++...
Click to expand...
Click to collapse
Rock on! Yeah right noI'm jsut getting my feet wet in C++, but I'm sure that shortly down the road I'll be working on learning it more in-depth. It is def much faster at runtime than .NET.
Thanks!!!
Native code?? Why??
kliptik said:
Rock on! Yeah right noI'm jsut getting my feet wet in C++, but I'm sure that shortly down the road I'll be working on learning it more in-depth. It is def much faster at runtime than .NET.
Thanks!!!
Click to expand...
Click to collapse
Hey guys
I recommand clearly .net developement! On desktops .net code is optimized on the target pc - c++ is compiled on that pc where you coded it. So .net is not any more slower than a native app - in some cases the target-optimation causes more powerful code as the native one.
Even on winmo the code is not slow (you don't feel the difference beetwin managed and unmanaged). Clearly, the .net gdi is slow and has not very much caps... But there are simply ways to access Open GL ES and programming is damm more easy than c++.
And last but not least: WinMo 7 apps are written with the XNA Game Studio or Silverlight - that means you'll code in managed c#!!
So get started with C#!!!
Chabun
thanks for this link
chabun said:
Hey guys
I recommand clearly .net developement! On desktops .net code is optimized on the target pc - c++ is compiled on that pc where you coded it. So .net is not any more slower than a native app - in some cases the target-optimation causes more powerful code as the native one.
Even on winmo the code is not slow (you don't feel the difference beetwin managed and unmanaged). Clearly, the .net gdi is slow and has not very much caps... But there are simply ways to access Open GL ES and programming is damm more easy than c++.
And last but not least: WinMo 7 apps are written with the XNA Game Studio or Silverlight - that means you'll code in managed c#!!
So get started with C#!!!
Chabun
Click to expand...
Click to collapse
I entirely disagree.
By coding using the pre-made Managed Libraries in the .NET Framework, you are making an app that, when run each time, has to load up those "immense" DLL's and access them for practically every function it does. And if you want to go beyond the basic abilities of C#, you have to start importing DLLs to use. However, in C++, as I understand it, the code is being generated based on the Header files on the computer, and the libraries. I find that C++ apps can be larger in size because more of their functions are 'internally' coded.
Sure, a C# app can be just as fast as a C++ app if the developer has no idea how to write a C++ app (no optimization or memory management), but that is exactly the reason to start with C++, to get better! A skilled C++ developer can create programs that run distinctly faster than C# applications.
Cyclonezephyrxz7 said:
I entirely disagree.
By coding using the pre-made Managed Libraries in the .NET Framework, you are making an app that, when run each time, has to load up those "immense" DLL's and access them for practically every function it does. And if you want to go beyond the basic abilities of C#, you have to start importing DLLs to use. However, in C++, as I understand it, the code is being generated based on the Header files on the computer, and the libraries. I find that C++ apps can be larger in size because more of their functions are 'internally' coded.
Sure, a C# app can be just as fast as a C++ app if the developer has no idea how to write a C++ app (no optimization or memory management), but that is exactly the reason to start with C++, to get better! A skilled C++ developer can create programs that run distinctly faster than C# applications.
Click to expand...
Click to collapse
Hey
Calm down. I also know c++ and i coded some apps in it.
Of course you have to import some dll's managed or unmanaged, but where's the difference to import any header file?? I still use some c++, no c - for real low capable hardware (a robot) where no other compiler is avaible...
But ispartacus75 has asked for some tuts and help to get started and we won't start a fight c++ vs. c#, will we?
But I'm still recommending c#...
Chabun
I'm also learning C# and a little C++ (for Windows and Widows Mobile) with the MSDN resources and I'm only 12
tayler900 said:
I'm also learning C# and a little C++ (for Windows and Widows Mobile) with the MSDN resources and I'm only 12
Click to expand...
Click to collapse
Mad props!!!
If you want to make a nice GUI, use QT!
Say no to C#! Blah it is no good. Go with C++ all the way. You won't regret it.
Anyway, go to Qt.nokia.com and get into Qt. There is a lot to learn at first but it will pay off for any c++ developer. It is free and you can develop for winmo 5.x-6.5.x. Also using QtDesigner you can build the Gui without writing a single line of code. Let me know if you want an example I can whip this up in no time.
Hi all.
After a lot of searching around, and reading tutorials etc I decided to go with C++ to start off with.
Someone asked why I wanted to do this rather than just use a calculator or an Excel sheet. I wanted to do it simply to see if I could. I have a couple of little projects in mind and if I could sort this one out I might be able to have a go at the others.
So far I have downloaded Code::Blocks as the compiler, seems to do the job so far. I have also written the code for what I want:
/* This program is designed to calculate the number of points available in a poker
league game, and then divide the points up for the 6 players on final table. This
is based on the following percentages;
1st place = 40%
2nd place = 20%
3rd place = 15%
4th place = 10%
5th place = 8%
6th place = 7%
*/
#include <iostream>
using namespace std;
int main()
{
int players = 0; //number of players in the game
int x = 200; //number of points generated from each player
cout << "Number of players?" << endl; //requests total number of players
cin >> players; //user specifies number of players
int total = players * x; //calculation for number of points available in the game
cout << "Total Points = " << total << endl; //reports the total number of points
cout << endl; //line spacer
/* The next section calculates the points for each place 1-6 based on the above percentages
and then reports those points to the user */
int first = (total/100)*40;
cout << "First Place = " << first << " points" << endl;
int second = (total/100)*20;
cout << "Second Place = " << second << " points" << endl;
int third = (total/100)*15;
cout << "Third Place = " << third << " points" << endl;
int fourth = (total/100)*10;
cout << "Fourth Place = " << fourth << " points" << endl;
int fifth = (total/100)*8;
cout << "Fifth Place = " << fifth << " points" << endl;
int sixth = (total/100)*7;
cout << "Sixth Place = " << sixth << " points" << endl;
return 0;
}
Click to expand...
Click to collapse
At the moment this seems to be working. I press F9 and it will run the program exactly as expected.
I now have the .exe, but when I run it the window closes as soon as the calculations are complete. How can I sort this before continuing on with the project?
Next step is the GUI (I think, kinda gone head first into all of this), so want to get this problem sorted first.
Thanks for taking a look

Transition from Android to Web App?

Namaste my fellow developers.
I am a rather young developer, who started off with Android and have developed about 10-15 apps till today out of which 2 are up on Google Play.
Just to increase my knowledge and sector I was planning to make a shift into web apps. I did learn Java specifically for Android but want to get my hands on the other platforms as well. So my questions, Sirs and Madams, are:
1.Technically, How is Android and Web Apps different?
2.Should I make the transition?
3.How do i start? (some resources would be helpful)
All and Every feedback would be appreciated. Thank YOU!
hi karantrehan, my two cents on the matter
1. you can think of a web app as a web site running inside an Android Webview, with all its files (html, images, javascripts, css, ...) bundled inside the app. The enclosing app just launches an Activity with a webview, everything else is done by html and javascript (although you can bind java code to javascript function to exploit Android's APIs).
2. It depends: I think web apps are a viable choice in two situations:
you're a web developer that want to build an app without having to learn Android
you want to build a cross-platform app, reaching Android, iOS, WP without learning every single language
Otherwise, I would not advise it, I don't see particular advantages... unless you want to learn something new!
3. for the Android integration part, take a look here: developer.android.com/guide/webapps/webview.html
For the html/css/js part.... well, web development is as old as the web itself, there are tons of guides out there Don't miss some helpful projects like jQuery Mobile.
karantrehan said:
Namaste my fellow developers.
I am a rather young developer, who started off with Android and have developed about 10-15 apps till today out of which 2 are up on Google Play.
Just to increase my knowledge and sector I was planning to make a shift into web apps. I did learn Java specifically for Android but want to get my hands on the other platforms as well. So my questions, Sirs and Madams, are:
1.Technically, How is Android and Web Apps different?
2.Should I make the transition?
3.How do i start? (some resources would be helpful)
All and Every feedback would be appreciated. Thank YOU!
Click to expand...
Click to collapse
1. Web Apps are made using multiple languages. Front-side/Client-side, they are developed in HTML, CSS, and JavaScript. Out of the three, JavaScript is the only programming language. HTML is a markup language, and CSS is used for UI and UX. You could also use the Dart language. Dart is a new client-side language developed by Google. Currently, however, no major browser supports it (not even Google Chrome), and so in the end, it gets compiled into JavaScript.
Server-side (backend), there are a multitude of programming languages you could use. Java (through JSP), PHP, Ruby on Rails, Python. Typically you're using PHP and SQL for anything in regards to a database.
Web Apps can be hosted in a browser, or you can submit them into App Stores using things like Apache Cordava.
2. As a developer of any sort, you should always improve and learn new languages. Its better for marketability, improves your skillset, and overall can make you a better developer. So, in the end, the choice is up to you. I would highly recommend you to do so.
3. There are tons of resources available. You can search for tutorials on google or youtube. When I got started, I used w3schools to learn HTML, CSS, and PHP. I would really recommend using YouTube as well if you are a visual learner like me.
1. Like reProgrammed said, web apps are a bit different in that there's a couple of layers to them as opposed to Android apps. The back-end logic that does your database fetches and such is programmed in PHP, Python, ASP.NET (C#/VB.NET), etc. The front-end website, the pages and stuff you interact with, are done with primarily (X)HTML, CSS, and JavaScript. And for databases you've got SQL Server or MySQL, mainly.
2. Absolutely. I'm a developer myself, professionally and as a hobby, and it's never a bad idea to learn a new language or framework or environment. It'll make you a better developer and can get you jobs, or foot in the door, if that's your profession.
3. I don't really have many resources. However, in the past I've used:
W3Schools
MSDN (for C#)
Stack Overflow
Google
And then there's always books. They can get outdated but they can be great resources. I still sometimes refer to my "Android for Dummies" book when I'm working on my Android app, even though I Google search more often. Hope that helps.

Categories

Resources