SDK for HTC HD2? and other quick questions on programming apps - General Questions and Answers

Hi all,
I have just got my new HD2 and I'm keen to write a couple of apps for it. I have some limited experience with programming Processing, Java and wrote a little bit of C++ a few years ago. I have no experience at all with writing mobile apps so am after a few tips to get me up and going.
I understand its easiest to program through the .Net framework and I can bring up a template through visual basic 2008 for that. The apps I am keen to write will require access to the phones sensors, in particularly the g-sensor and accelerometer. Forums on the net tell me I need to download the SDK for the phone and use that to access all of the phones features. I have the following questions:
Where do I download the SDK for the HTC HD2? Some forums say you just use the standard HTC SDK, is this correct, are they talking about an android SDK and where can I get it from?
In using the SDK, do I simply import it as a package into my code and call up its functions? In which case is there documentation for it?
In case I get stuck, is there any good tutorials online anywhere for programming apps for windows phones?
Probably some very basic questions but they still tripped me up!
Thanks in advance, I look forward to sharing my apps with you.
Cheers all, Ollie1234

SDK Software Developer Kit & DRK Developer Resource Kit
Learning XML - Overview
The xml International Standard Organization (ISO) -=[ find xml apps here too ]=- :
http://www.w3.org/standards/xml/
XML is an almost universally supported way of exchanging documents and data across applications and platforms. Microsoft has a family of XML technologies that allows users with differing requirements to do what they need, as simply and efficiently as possible.
Which XML application programming interface (API) should you use? Here are our top-level guidelines:
If you are writing managed code targeting the .NET Framework in C#, Visual Basic, J#, managed C++, or any other managed language, you should use System.Xml and/or LINQ to XML in the .NET Framework.
If you are writing native code using Visual Basic 6, C, C++, or a scripting languages you will probably want to use the MSXML library:
MSXML6 is the latest version that's included with Windows XP SP3 and all versions of Windows Vista and Windows 7. New applications should be using MSXML6.
MSXML5 is an older library optimized for Microsoft Office 2003 and 2007 and can only be used on machines that have an Office license.
MSXML4 is nearing deprecation. MSXML6 should be used for new applications
MSXML3 is included in Windows XP and higher.
Comprehensive list of all MSXML versions and variants
If you are writing native code and your application has tight performance or memory constraints, consider the XmlLite API.
What XML Tools Are Available? Visual Studio offers a core collection:
XML Editor
XML Schema Explorer
XSLT Debugger
XML Tools in Visual Studio overvi
Read more HERE; http://msdn.microsoft.com/en-gb/data/bb291061.aspx
Core Downloads for Windows Mobile
Windows Mobile 6 SDKs: documentation, sample code, header and library files, emulator images, and tools for building Windows Mobile 6 applications in Visual Studio
Windows Mobile Device Center 6.1 for Windows Vista (32-bit or 64-bit)
Microsoft ActiveSync for Windows XP or earlier versions
New Downloads
Windows Embedded CE 6.0 Monthly Update June 2010
Office 2010: Product Guides
Windows Embedded CE 6.0 Monthly Update May 2010
SQL Server Compact 3.5 SP2 for Windows Desktop
Windows Embedded CE 6.0 Monthly Update April 2010
Windows Embedded CE 6.0 Monthly Update March 2010
Related Resources
Windows Embedded CE Development Tools
Windows XP Embedded SP2 Update
What is the .NET Micro Framework?
Windows Mobile Starter Kits
Windows Mobile 6 Developer Resource Kit Trial Software
Popular Downloads
Windows Mobile 6 SDK Refresh
Windows Mobile 6 Localized Emulator Images
SQL Server Compact 3.5 SP2 for Windows Desktop
Windows Mobile 5.0 SDK for Pocket PC
Office 2010: Product Guides
Windows Mobile Developer Power Toys
SQL Server Compact 3.5 SP1 and Synchronization Services for ADO.NET v1.0 SP1 for Windows Desktop
Library Topics
Installing Developer Tools for Windows Mobile
Welcome to Windows Mobile 6 Documentation
Windows Mobile 6 SDK Documentation
Windows Mobile 5.0 SDK Documentation
____Only if you want to code your applications to run on all WM6 devices without any problems you need the WM6 Standard SDK too!!!!
Development Resources for WM- here on xda-developers.com UPDATED
http://forum.xda-developers.com/showthread.php?t=445396
Before you get stuck try to find online books about programming applications/games for windows phones. May be some other kind soul has a link for us?
Anyway have fun informing yourselves folks,
EDiT: Though this thread is created recently a few moments later;
I answered a question like this one in Windows Mobile Software Development which contains way more links than I collected here!!! Plus I plan to keep that thread up2date ie adding more links soon..!

ollie1234 said:
The apps I am keen to write will require access to the phones sensors, in particularly the g-sensor and accelerometer. Forums on the net tell me I need to download the SDK for the phone and use that to access all of the phones features.
Click to expand...
Click to collapse
I believe that the common WM SDK does not give access to the G-Sensor and other HTC specific stuff. Some probably hacked G-Sensor information is available. It is not entirely correct but it does work on the HD2.
http://www.scottandmichelle.net/scott/comments.html?entry=784
ollie1234 said:
In using the SDK, do I simply import it as a package into my code and call up its functions?
Click to expand...
Click to collapse
WM SDK's are mostly a collection of header files, import libs and samples. You include the header files you need in you own code, then you can use the functions they declare, and link with the appropriate libs.

Nice work guys.. Thanks a lot for your assistance. I will post on how I get on!
Ollie.

Related

Developing Applications for XDA II

Does anybody know with what IDE (Integrated Development Environment) it is possible to generate Applications?
eMbedded Visual C++ (based on Microsoft Visual Studio IDE)
http://www.microsoft.com/windowsmobile/resources/downloads/developer/default.mspx
With Visual Studio.NET 2003 you can develop applications that use the .NET Compact Framework.
Further to the last response - these Compact Framework applications can be written in VB.Net (which is very similar to VB, though more verbose) *or* C# - there's no difference in the speed they run, which (for PC applications at least) is a hell of a lot faster than VB6 code.
The VS2k3 environment even contains a device emulator, or can run code *on the device* and allow you to set breakpoints & go to the line an error occurred on. There's also a Windows Mobile 2003 SDK available from Microsoft which adds a Windows Mobile 2003 emulator.

Stupid: DC++ Windows Mobile

Hello all,
I would have a question here: is there any DC++ Hub Viewer for Windows Mobile?
I googled all the search terms I could think of and here's the result:
http://sourceforge.net/projects/mobiledc (good if you got Symbian UIQ )
Maybe some would find a thing like this useful...
Anyway, ***have a nice day***.
--- PS ---
Saw that poll?
Yeah, Symbian gets tons of good software. You know, I'd love to try to run Symbian on my Dash.
Read-Me-First (?)
For those who don't know what's DC++ (2 votes, this is getting bad... ) :
--- ENCYCLOPEDIA: DC++ HUBS ---
DC++ Hubs are... well, some tech thingies. (This was the description)
The hubs are used to host users. (Well, what else could they do and make them popular?)
The users connected to hubs can:
- chat in a main chat and in personal messages (PMs)
- share files from their computer (mostly pirated )
- respect some rules
You can connect to the hubs with a DC++ Client or Viewer, like StrongDC++ or oDC (those are the most known).
Almost all the hubs require a minimum share (ex. 5GB). That means you need to have at least that share to connect to a hub.
--- ENCYCLOPEDIA: DC++ HUBS (END) ---
You want more info? Go to Wikipedia: http://en.wikipedia.org/wiki/Direct_Connect_(file_sharing)
Hope that helps, newbies to DC++! (I don't want any more votes at "What's DC++?" !!!)
*** Have a nice day! ***
I've never used DC on PC or other devices. However, WMTorrent is an absolutely great app if downloading is your thing.
If there's code on sourceforge for UIQ, and DC is an open protocol, you could try to knock together a client yourself. Not a quick solution, but c'est la vie
V
Thanks for the encouragement, V.
Knocking it toghether may be a solution, but if I am not mistaken, it takes the WM SDK and VB Studio (commercial )... or d'you know a free WM-development application?
And where on earth is the source code at SourceForge?!
*** Have a nice day! ***
eMbedded Visual c++ 4 is absolutely free together with WM 2003 SDK (I am too lazy for links so please search MS downloads)
Apps written with it will work on WM 5 and 6 and if you know how to play with linkage you can even get access to new APIs not supported in WM 2003 SDK.
They give you full functionality and in my opinion is still the best way of coding for WM.
levenum said:
Apps written with it will work on WM 5 and 6 and if you know how to play with linkage you can even get access to new APIs not supported in WM 2003 SDK.
Click to expand...
Click to collapse
Do you have a rough guide on how to do this? I did a search and it seems that people are much happy to pay for a £100+ new Visual Studio and do not borther to find ways to get a free dev env for windows mobile. I think (think) the software I'm writting now runs on WM5, but I think there are quite some API missing in WM2003-SDK. Do you think it will work if I were to throw everything *.h stuff from WM5-SDK to overwrite WM203-SDK?
Ref:
No free dev env for WM5-SDK, for eVc+ or the VS Express - http://www.pocketsoap.com/weblog/2006/07/1656.html
Q: Do you think the hobbyist and $10-per-program shareware market is important for Windows Mobile? If so, can you explain why Visual Studio 2005 Standard ($249) is required for targeting WM5? eVC++ 4 was free. The WM5 SDK cannot be installed on VS Express.
A: Jack2, there are various evaluation versions of Visual Studio 2005 available that you can try out before making a purchase decision, there is one for Visual Studio 2005 Professional edition (90 days) and one for Visual Studio 2005 Team Suite (180 days),
Click to expand...
Click to collapse
http://msdn.microsoft.com/chats/transcripts/mobileembedded/06_0125_msdn_ce.aspx
There are basically two ways to use missing APIs (personally I never found one I really needed except maybe "ExitWindowsEx" once).
1) Manually unpack the MSI file for the SDK you want. (Sorry, I do not remember the link for the extractor).
Then in Project->Settings->Link you can just redirect the default libraries to the folders of that SDK. What you need are the headers for the prototypes (h files) and the actual lib files.
2) If its just one or two functions you can use LoadLibrary and GetProcAddress to dynamically connect with the DLL. If I am not mistaking this is call "implicit" linking.
Note that if you use method 1 your app will not run on WM 2003. If you use method 2 it will run on 2003 but get NULL as function pointer and fail to execute the missing API so this way you can make widely compatible apps.
P.S.:
In my personal opinion, M$ gave away an IDE at first to gain a wide application base for its new platform. Now that Windows Mobile is an established and even leading mobile OS they are back to their usual policy of selling expensive, bloated and overcomplicated software.
They simply no longer need freeware developers for WM.
levenum said:
eMbedded Visual c++ 4 is absolutely free together with WM 2003 SDK (I am too lazy for links so please search MS downloads)
Apps written with it will work on WM 5 and 6 and if you know how to play with linkage you can even get access to new APIs not supported in WM 2003 SDK.
They give you full functionality and in my opinion is still the best way of coding for WM.
Click to expand...
Click to collapse
Yeah, eVC++ would be good (if you know how to fight with it), but the installer asked me for a serial. Why am I always cursed?
PocketDC++ for Pocket PC *Awesome*
I found this cool DC++ Client for Pocket PC called "PocketDC++". It seems like it doesn't have Download support yet. It wil be awesome if Download option is added.
PocketDC++ homepage : http://mistysoft.jino-net.ru/
External download Link : http://xpojnt.iglu.cz/download/tklienti/pocketdc0.1.8.9.rar
I have a copy of DC++ Source code and a copy of VS .NET and VB as well as Dephi I even altered a version of DC++ a while ago....but yeah I think it would be great for on the go downloaders for file checking and user checking/count....excellent idea

Creating a WM Application - Where to start ?

I hope this is the right place to put this, if not, mods, feel free to remove and/or delete it. I've dabbled a bit with C before, but that's about the extent of my programming experience. I'd like to create a program that will parse the information from a website and display it... I don't imagine something like that would be hard to do, but I have no idea what tools I would even need to start writing a PPC application.
Kitco (a website that gives live quotes of precious metals) recently came out with an application for the iphone that neatly formats all this information:
http://www.kitco.com/images/banners/KitcoiPhone/iphone.html
I'd like to basically create a PPC version of this application.
Is this something that an individual with next to no experience could hope to achieve ? I'd have to create a GUI, initialize the internet, connect and retrieve a webpage and remove the relevent information before displaying it.
Any help would be greatly appreciated. I've always wanted to become more familiar with these sorts of things and figured this project would be a great way of learning it.
Thanks!
ThreadMoved
Next to no experience? I dont think so. You have to have a little under your belt first and the only way to achieve that is to start readin right here!
I'm also interested in the expert answers to this question.
My very non-expert understanding is as follows:
VS 2005 (microsoft visual studio) can create executables for WM devices using a SDK (low level) or .Net CF (medium level) interface. You want to use .Net CF (compact framework) because it is supposed to make things easier. I think you have to use C++ to use the SDK but you can use C++, C#, or Visual Basic and write to .NET CF.
VS 2005 is an IDE (integrated development environment). It contains features to edit, compile, and even test your program using simulator/debugger. I think there are some non-microsoft IDE's that can also generate Windows Mobile code -- there is a market for cross-platform environments (e.g. programmers write code using a special library instead of the windows SDK or .NET function and the same source code can be compiled to run on Blackberry, iPhone, S60, Windows Mobile, etc...)
Instead of writing to the phone hardware (or .NET abstraction) directly, you can write your application using Java. You would use some Java compatible IDE (like Eclipse, Jbuilder, or NetBeans) to create Java applets that you download to your phone. You'd have to install a Java VM (virtual machine) on your phone to run these applets. I think the downloadable games for phones are Java applets.
Disclaimer: I haven't worn my "programming cap" since 2001 and hopefully things have gotten simpler. In my previous life I designed operating systems for mainframe computers.

Help to develop Mobile site

Hello,
I would like to develop a site where users can view it using WM or Android,or other mobile , Site will be ASP.NET and Sql server, pls help how to do this..
Thanks
Partha
This is not a phone related Q so I keep it brief;
-=[ All Microsoft® linx ]=-
First take a look at MSDN Library
Then cycle to Introduction to deverloper tools for Windows Mobile based devices
Copy/Paste action;
Microsoft Corporation
May 2005
Applies to:
ActiveSync version 4.0
eMbedded Visual Tools version 3.0 - 2002 Edition
eMbedded Visual C++ version 4.0 SP4
eMbedded Visual Basic version 3.0
ASP.NET
SQL Server 2000 Windows CE Edition versions 2.0 and 3.0
SQL Server Mobile Edition
Visual Studio 2005
Visual Studio .NET 2003
.NET Compact Framework versions 1.0, 1.0 SP1, 1.0 SP2, and 2.0
Windows Mobile version 5.0
Windows Mobile-based devices
Windows Mobile 2003 Second Edition software for Pocket PCs
Windows Mobile 2003 Second Edition software for Smartphones
Summary: This article is a central reference point that describes the tools and supporting technologies for developing applications for Windows Mobile-based devices. This article provides a summary of each tool and the platforms it supports. It also provides an overview of common development scenarios and provides guidance about how you can select the preferred tool and technology to apply to each scenario. (13 printed pages)
Finally visit Windows Mobile Developer Center
BTW If you bump into something you can not download from MSDN network then it is time to login with your @live.com account !
Suc6

[Q] How to create homebrew app with native code which run in emulator.

Hi Guys,
I would like to create simple app with NATIVE code which run in emulator.
It is not possible to use solution in http://forum.xda-developers.com/showthread.php?t=1299134&highlight=developer+guide because it's use some ARM code.
Do you have any idea how make things work?
Thank you,
Ch.
You actually could (msotly) use that guide, but you would need to recompile the ARM portion for x86. My guess as to the best way to do this would be to use the "Platform Builder" for CE6 or CE7, instead of using the WinMo 6.5 platform as your target. WinMo only shipped on ARM devices, so far as I know, but the underlying OS, Windows CE, is very portable and the tools for it support building on a wide variety of architectures. WP7 is built on a version of CE somewhere between CE6 and CE7.
Otherwise, the stuff about using ATL, making a COM library, using ComBridge from the WP7 app, etc. all still applies.
That all said... why would you want to do this? Do you not have an actual phone to test on? Porting between ARM and x86 isn't *that* hard, but you shouldn't just assume that it'll work in all cases, so it makes a lot more sense, if you're building native code, to build and test for the same architecture you're planning to release on.
Additionally, the emulator may be missing some of the libraries that are present on the phone.
Thanks a lot. I will try it.
This is very beginning of my school project. I want only demonstrate that is possible to run some native code on WP7. Next phase of project will be on real device which I don't have right now..
Well, good luck, but I'd tend to say you're setting yourself up for a risk of failure. I don't know what it will take to use the CE Platform Builder for something like this; I have it installed but have never tried using it.
There may also be a way to compile for x86 using the WinMo build tools; I think some of the old "emulators" for WinMo were also x86 virtual machines (much like the WP7 emulator is). I never tried, though.
Risk of failure? I don't see how. The hardest part of this is finding a way to get his .exe on the emulator device and unlocking it. If he isn't using ARM ASM in his project, "porting" to x86 (or any other processor WinCE supports) should be trivial as long as a sufficiently complete SDK is available. The main issue with x86 on newer Pocket PC-like targets is that there are no Pocket PC SDKs targeting it newer than the Pocket PC 2003 one. If you want to use newer WM5 only features like GPSAPI, you'd probably need to use a CE 6.0 SDK instead.
If he doesn't want to do real time debugging, any of the Windows CE development tools or even 3rd party tools like Bloodshed DevC++, CE gcc/MinGW or FreePascal should all suffice. Windows CE is a very backward compatible OS so even an application targeting the CE 2.11 platform/SDK should still run on WP7 when you are careful to use supported APIs.
If you don't want to install Platform Builder and generate your own custom OS to base an SDK on, there are plenty of SDKs to choose from. Of course, some are worse than others. If you are using the CE 4.2 or 5.0 STANDARD_SDKs, you might become a bit frustrated when you realize they are missing many basic things like the Windows CE SIP APIs. (something that has been available for CE since 1.01 in 1997). But if you don't care about using the latest native CE kernel features and still want to use a newer IDE like VS2005/VS2008, the CE 5.0 STANDARD_SDK should be enough if you are careful. Though, I usually install things like eMbedded Visual C++ 3.0 and 4.0 along with all the Pocket PC and Handheld PC SDKs just in case I need a header or lib file that one or the other is missing.
The following MS SDKs can target x86:
-eVC3
Pocket PC 2002
Smartphone 2002
Handheld PC 2000
-eVC4
Pocket PC 2003
Smartphone 2003
STANDARDSDK_400
STANDARDSDK_401
STANDARDSDK_420
STANDARDSDK_500
-VS2005/2008
STANDARDSDK_500
Another useful x86 SDK I've found is the one for the Allegro CE/DOS Field PC:
http://www.junipersys.com/Juniper-Systems/support/Developers/Allegro-Field-PC/Allegro-CX
Here are some download links to many of the CE SDKs and compilers that were released over the years:
Here are some links to download some of the tools I've mentioned:
http://www.hpcfactor.com/developer/
http://www.microsoft.com/download/en/search.aspx?q=embedded visual tools
You will need SP4 for eMbedded Visual C++ 4.0 if you wish to use newer SDKs with it.
http://www.microsoft.com/download/en/search.aspx?q=pocket pc sdk
Ummm... maybe you missed the part where this is WP7 forum, and the OP is trying to run native code on the WP7 emulator... I can tell from your post that you're not terribly familiar with WP7 development, so here's a few salient points:
Compiling to a .exe is a waste of time. WP7 won't run foreign EXEs, at all, unless you make some pretty low-level changes that aren't possible on the emulator (see "full-unlock" custom ROMs). You have to write a managed app (which compiles to a DLL hosted inside a low-privilege EXE that's built into the system) and a COM library and use the InteropServices ComBridge API. So far we haven't even gotten P/Invoke to work.
WP7, especially Mango, uses a limited set of native APIs and the APIs have changed somewhat in the last decade or so. They aren't supposed to be available to third-party devs at all, so any backward compatibility is basically a convenient accident. Targeting Smartphone 2003 *might* work, but then, it might not. Even a number of WinMo 6.5 APIs aren't available or don't work.
Since it appears that the OP is just going for a demo project, he or she probably is a lot less interested in getting the most powerful APIs, and is probably hoping for something closer to invoking a MessageBox from native code.
All that said, however, it's true that there are WinCE SDKs which can build native x86 code. I'd tend to suggest using the CE6 or CE7 Platform Builders, since they're the most recent (WP7 is somewhere between the two), but there are other options. You probably want to follow the guide as much as possible, including things like using ATL, as it makes writing a COM library a lot easier and that's the best way we currently know for executing native code in WP7.

Categories

Resources