<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-5469185469425559567</atom:id><lastBuildDate>Thu, 12 Nov 2009 06:36:13 +0000</lastBuildDate><title>ageye</title><description>another Windows Mobile programming blog...</description><link>http://blog.ageye.de/</link><managingEditor>noreply@blogger.com (ageye)</managingEditor><generator>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5469185469425559567.post-3279859192772015192</guid><pubDate>Sun, 05 Apr 2009 10:00:00 +0000</pubDate><atom:updated>2009-04-05T12:21:04.762+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>iPhone</category><category domain='http://www.blogger.com/atom/ns#'>G-Alarm</category><category domain='http://www.blogger.com/atom/ns#'>Windows Mobile</category><title>Things I don't understand, part I: iPhone SDK</title><description>Dear readers,&lt;br /&gt;expo7 (designer of the ageye tools) "forced" me to try to get G-Alarm running on the iPhone. First I didn't want to do that because I somehow don't like Apple's products (as some of you may know). Nevertheless I thought about it and couldn't find any alarm clock for the iPhone which has the functionality of G-Alarm...&lt;br /&gt;&lt;br /&gt;That's why I've registered at Apple's developer page and read about programming for the iPhone which seems to be pretty cool (no need for designing own control because iPhone's controls already look "good", and so on).&lt;br /&gt;&lt;br /&gt;After some hours (and nearly after buying a MacBook :)) I searched for methods to schedule the launch of an alarm and I soon recognized that this simple task is not possible on the iPhone.&lt;br /&gt;Okay, so let's hide G-Alarm and let it wait in the background until the specified time occurs -&gt; mission impossible! iPhone seems to allow only one program fully running at one time.&lt;br /&gt;I understand that this way has a lot of pros (especially for the stability and battery life) but it also avoids to develop a good alarm clock for the iPhone...&lt;br /&gt;&lt;br /&gt;There are some alarm clocks for the iPhone like &lt;a href="http://www.mobileappcenter.com/index.php?option=com_content&amp;view=article&amp;id=46&amp;Itemid=54" target="_blank"&gt;Relax Alarm&lt;/a&gt; but the developer faces the same problem I described above.&lt;br /&gt;"&lt;span style="font-weight:bold;font-style:italic;"&gt;Because of Apple's method of separating applications from their operating system, Relax Alarm must be open and active for its features to work. This is true of all applications that you will find in the app store. If you close an application, it is removed from memory and will not run in the background.&lt;/span&gt;" and "&lt;span style="font-weight:bold;font-style:italic;"&gt;When using the app as a bedside alarm clock, please plug in the device so that it can have sufficient power to run during the night.&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So I guess, I have to stick at Windows Mobile development... This is most of the time very annoying because of different manufacturers and different behaviour of each device but it's soooooooo powerful...&lt;br /&gt;&lt;br /&gt;Koushik Dutta made an illustration about mobile development which describes the whole thing about WM, Android and iPhone very good:&lt;br /&gt;&lt;a href="http://www.koushikdutta.com/2009/03/mobile-phones-my-thoughts-on-whole.html"&gt;http://www.koushikdutta.com/2009/03/mobile-phones-my-thoughts-on-whole.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now back to G-Alarm 1.6... I stopped working on it for nearly a day now :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5469185469425559567-3279859192772015192?l=blog.ageye.de'/&gt;&lt;/div&gt;</description><link>http://blog.ageye.de/2009/04/things-i-dont-understand-part-i-iphone.html</link><author>noreply@blogger.com (ageye)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5469185469425559567.post-3312264405774451803</guid><pubDate>Fri, 03 Apr 2009 09:55:00 +0000</pubDate><atom:updated>2009-04-03T12:07:16.579+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Private</category><category domain='http://www.blogger.com/atom/ns#'>No Windows Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Vacation</category><category domain='http://www.blogger.com/atom/ns#'>No Programming</category><title>Back from our vacation...</title><description>Finally, we're back in good old cold Germany after ~11 days...&lt;br /&gt;First of all I'd like to thank you all who have supported me by donating. I didn't only buy beer and coffee but also saved some Euros, actually all of your Euros, to have some warm days with my girlfriend in Egypt.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;THANK YOU!!!!&lt;/span&gt; Without your support I would have to stay in Germany and probably would have developed some new features and tools in the last 11 days :)&lt;br /&gt;&lt;br /&gt;It was pretty strange for me to have absolutely no internet connection or even a computer. I can't remember the last time I've been even a day without my laptop :)&lt;br /&gt;&lt;br /&gt;Nevertheless it was a great trip with lots of relaxing, snorkeling and sun...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://blog.ageye.de/uploaded_images/IMG_0150-751945.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://blog.ageye.de/uploaded_images/IMG_0150-751940.JPG" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5469185469425559567-3312264405774451803?l=blog.ageye.de'/&gt;&lt;/div&gt;</description><link>http://blog.ageye.de/2009/04/back-from-our-vacation.html</link><author>noreply@blogger.com (ageye)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5469185469425559567.post-5787695632957997279</guid><pubDate>Thu, 12 Mar 2009 22:02:00 +0000</pubDate><atom:updated>2009-04-05T12:22:26.553+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Interview</category><category domain='http://www.blogger.com/atom/ns#'>Blabla</category><category domain='http://www.blogger.com/atom/ns#'>1800PocketPC</category><category domain='http://www.blogger.com/atom/ns#'>Windows Mobile</category><title>Interview for 1800PocketPC.com</title><description>Although I can't imagine anyone is interested in what I'm talking or thinking, &lt;a href="http://www.1800pocketpc.com/2009/03/12/meet-the-developer-1-jorg-michel.html"&gt;1800PocketPC.com&lt;/a&gt; wanted to do an interview with me.&lt;br /&gt;It's also mirrored on &lt;a href="http://forum.ppcgeeks.com/showthread.php?p=767199"&gt;PPCGeeks&lt;/a&gt; and &lt;a href="http://forum.xda-developers.com/showthread.php?p=3455126"&gt;xda-developers&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'll post it here as well so it doesn't get lost :)&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;p&gt;We had to chance to chat with J&amp;ouml;rg Michel the developer of apps like G-Alarm, G-Profile, G-Invaders and more. J&amp;ouml;rg has created some great apps with beautiful UI that is finger friendly too. You can find all his apps at his website &lt;a target="_blank" href="http://ageye.de/"&gt;http://ageye.de&lt;/a&gt;. I want to thank you for taking the time to chat with us here at 1800PocketPC.com. Well lets get in to it...&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Tell us a bit about yourself &lt;/strong&gt; &lt;/em&gt;&lt;br /&gt;First of all: Hello to everyone who takes the time to read about my thoughts... It may not be worth it so please don't blame me :)&lt;br /&gt;My name is Jörg Michel, I'm currently living in Ulm/Germany but have grown up in the near of Oettingen/Bavaria where the good beer comes from (I really like it). I'm 24 years old and I'&lt;span class="__mozilla-findbar-search" style="padding: 0pt; background-color: yellow; display: inline;font-size:inherit;color:black;"  &gt;&lt;/span&gt;m currently studying medicine in my 10th of 12 terms.&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Tell us a bit about  your apps ?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;My first apps were the games &lt;a target="_blank" href="http://ageye.de/index.php?s=caver/about"&gt;Caver&lt;/a&gt; and &lt;a target="_blank" href="http://ageye.de/index.php?s=ginv/about"&gt;G-Invaders&lt;/a&gt;... Nothing much to say about them. These are very basic and poorly designed games with an online high score feature which is probably the best of it :)&lt;br /&gt;&lt;a target="_blank" href="http://ageye.de/index.php?s=galarm/about"&gt;G-Alarm&lt;/a&gt; is an alarm clock which has probably more features than any other alarm tool and is also one of the most reliable clocks. It still has some problems on old devices which quickly run out of memory but I'm currently developing a new graphic engine which hopefully improves the memory usage.&lt;br /&gt;&lt;a target="_blank" href="http://ageye.de/index.php?s=gwatch/about"&gt;G-Watch&lt;/a&gt; should combine three different aims: a stopwatch, a countdown timer and a GPS tracking function. Of course you don't need a GPS device or have to use the stopwatch if you just want to have a countdown timer in the kitchen.&lt;br /&gt;&lt;a target="_blank" href="http://ageye.de/index.php?s=glight/about"&gt;G-Light&lt;/a&gt; can help you to decrease battery consumption by dimming the backlight according to the ambient light. Of course you need a supported device which owns a light sensor (HTC Diamond, Touch Pro, etc.)&lt;br /&gt;&lt;a target="_blank" href="http://ageye.de/index.php?s=gprofile/about"&gt;G-Profile&lt;/a&gt; is my newest tool which can manage your device (e.g. set the volume and ring tones, turn on/off phone radio, wifi, or bluetooth, and so on) according to your needs. It can activate the profiles by time, when an appointment occurs, when you connect something to your device (e.g. headset, ac power), when your phone is in a specified cell and so on...&lt;/p&gt; &lt;p&gt;&lt;span id="more-3773"&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;How did everything start?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Well, everything started by getting my new HTC Diamond some months ago (I think it was June 2008) and looking for some tweaks and new software for it on xda-developers.com because I was disappointed by the performance and look&amp;amp;feel of the ROM (1.34?). I stumbled upon the &lt;a target="_blank" href="http://www.koushikdutta.com/search/label/Sensor%20API"&gt;sensor API of Koushik Dutta&lt;/a&gt; who is by the way one of the most important guys for Windows Mobile programming - he brought the access to the sensors which opened the doors for so many tools.&lt;br /&gt;I remembered playing the game "Cave Run" lots of years ago on my Palm and I thought about extending the great accelerometer example of Koush to a "Cave Run" clone without even knowing how to program in C# or .NET Compact Framework...&lt;br /&gt;As you may know I succeeded and Caver got soon playable. Afterwards I had lots of ideas for new games and G-Invaders was born.&lt;br /&gt;After some weeks I thought of doing some serious stuff and started to develop G-Alarm because I was so disappointed by the Windows alarm clock and also a heavy sleeper...&lt;br /&gt;It started really bad, lots of bugs (I just think of the severe bug where G-Alarm didn't stop at the time change because of daylight saving) but it soon grew and now I'm pretty proud of it :).&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Whats WM device do you own and use?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;I own an old HTC Prophet which I don't use anymore and my HTC Diamond.&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;What sites do you usually hangout on?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;My first site for PocketPC related topics was &lt;a target="_blank" href="http://forum.xda-developers.com/"&gt;xda-dev&lt;/a&gt; and I still think it is a very good source for every owner of a PocketPC. But I really like other sites as &lt;a target="_blank" href="http://forum.ppcgeeks.com/index.php"&gt;PPC-Geeks&lt;/a&gt; as well and also write on the German forum &lt;a target="_blank" href="http://www.handy-faq.de/"&gt;www.handy-faq.de&lt;/a&gt;. And of course there is &lt;a href="http://www.1800pocketpc.com/"&gt;1800PocketPC.com&lt;/a&gt; :) &lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;How can we contact you ? ( twitter, facebook, etc )&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;I don't twitter, facebook, myspace or whatever. I still don't think that everything which is in the internet and gets widely used is a good invention - but that's my own opinion...&lt;br /&gt;You can &lt;a target="_blank" href="http://ageye.de/index.php?s=contact"&gt;contact me on my page&lt;/a&gt; (www.ageye.de), my forum or blog.&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Are you going to list your apps on the WM MarketPlace ?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;To be honest, I haven't heard much about the new WM MarketPlace yet... Is it already available? If so, where can I access it? :)&lt;br /&gt;If the conditions are good I will list my apps on it - for free, of course...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;What are your thoughts on WM MarketPlace ?&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;As I said, I'm not an expert for MarketPlace related things but I'm not sure what to think about it, yet...&lt;br /&gt;First of all: I don't like Apple and its products. I think they have a bigger monopoly in many sections than Microsoft ever had but will never get accused. I think it is a cheek to sell music player at a really high charge without shipping the software or even an AC adapter. If Microsoft would only allow to play .wma files on Windows they would have to pay - Apple may force you without consequences to not use .wma files on their iPods...&lt;br /&gt;As you can see I'm not a big fan of Apple, but the iPhone has brought some good and fresh ideas to the mobile world and I also like the idea to access the latest software on a marketplace.&lt;br /&gt;I'm just curious if some big Windows Mobile software development companies can buy better search positions when you try to find e.g. an alarm clock. Microsoft would be stupid to list e.g. G-Alarm on the first place which is free when it could earn a commission for helping to sell commercial software.&lt;br /&gt;So I'm looking forward on how it's going to work. Hopefully my tools have a chance...&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;em&gt;Any plans to expand to other platform like Android , iPhone ?&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;As you can read and see in my blog I'm currently working on &lt;a target="_blank" href="http://blog.ageye.de/2009/03/g-watch-06-preview.html"&gt;a graphical interface which is completely independent of Windows Mobile's controls&lt;/a&gt; and I have it nearly finished.&lt;br /&gt;I don't know how the mobile world will look like in a few years but I'm prepared to port my software to other platforms.&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;We know this is an ongoing project but how long did it take from the drawing board to your initial release of G-alarm ? What was your motivation to develop it ?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;The main benefit for me (which may be a curse for the users) is the fact that I share my new tools and features immediately with the users. Of course there have occurred a lots of bugs but because of the great community helping me to find them and proposing new ideas especially G-Alarm could grow like hell.&lt;br /&gt;So it takes only a few days from the idea to the first public release.&lt;br /&gt;My motivation:&lt;br /&gt;1. The built-in alarm clock didn't satisfy me&lt;br /&gt;2. I had a lot of time&lt;br /&gt;3. I got really angry when trying to find a good alarm clock. There are so many software companies which just publish crap for a lots of dollars. There are only a few which create high quality, good looking and finger friendly tools (the number increases, thanks to the competitors). Besides the fact that I needed the help of the community, teasing other commercial software developers was a big argument for me to keep the software free :) &lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;What are the future plan for your apps ?&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;I'll release G-Watch 0.6 in the next few days which already uses my new graphical “engine”. Afterward I'll create a new tool called G-Center (I'm not really happy with the name) which covers all installed ageye-tools (incl. export/import settings function) and maybe also be a customizable start center other apps as well.&lt;br /&gt;After that I'll probably come back to G-Profile or to G-Alarm. G-Profile definitely needs some new options (the so called “advanced profiles”) and G-Alarm needs the new engine...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;What are some of your favorite apps ?&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;I'm using &lt;a target="_blank" href="http://s2u2.ac-s2.com/"&gt;S2U2&lt;/a&gt; and &lt;a target="_blank" href="http://www.chi-tai.info/cs_batterystatus_xda_neo_wm5_im_cs.htm#Download"&gt;HomeScreen++&lt;/a&gt; which also demonstrate that freeware may be better than any commercial tool. The &lt;a target="_blank" href="http://www.opera.com/mobile/download/"&gt;Opera browser&lt;/a&gt; receives my biggest respect. It brought a quantum jump to Windows Mobile.&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;New WM devices have some amazing hardware like accelerometer which you have used very well in G-Alarm, its said Touch Pro 2 has a proximity sensor are you cooking up some ideas to exploit these ?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;I think it's a very good idea to have a proximity sensor. HTC's approach with the light sensor to recognize when you have your phone put at your ear to turn off the backlight is somehow ridiculous...&lt;br /&gt;I don't have any ideas yet what to do with the proximity sensor - first of all I would need such a phone and users with ideas :) &lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;When you consider the number of lines of code, which of your app is rated the highest and which one is the lowest?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Of course, I'm proud of G-Alarm. My download counter reached 450.000 downloads within about 6 months which is soooo awesome (of course you have to substract partial downloads, etc.).&lt;br /&gt;The development of G-Alarm has driven me crazy a lot of times - Windows Mobile is such a ungrateful operating system (thanks to all the different vendors with their different opinions on how to customize Windows Mobile).&lt;br /&gt;But now I'll hope that especially G-Watch and G-Profile catch up... G-Light is somehow my stepchild. The idea has a great potential but I somehow lost the interest in it...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;Did you create all the graphics yourself or did someone help you with the look-and-feel of your application?&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;I'm a poor designer... a very poor designer... Daniel Bergmann (aka &lt;a target="_blank" href="http://forum.xda-developers.com/member.php?u=601524"&gt;expo7&lt;/a&gt;) does all the graphics for me! He is a really great designer who creates so professional graphics that I could take a bow in front of him every single day...&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;A tip for everyone who is interested in programming for Windows Mobile:&lt;/strong&gt;&lt;br /&gt;I develop my tools with C# using .NET Compact Framework and some native C++ - I haven't bought a book to learn it. All you need is an idea for a project, a good sample on how your desired language works (for me it was the sensor API of Koush) and time to try a lot of code until it works as it should. It is really easy! If you have an idea, try it!&lt;/p&gt; &lt;p&gt;&lt;em&gt;It was great chatting with you Jörg, good luck with your studies and the WM development. Looking fwd for the new G-Watch and G-Center. May be some of our readers can suggest an alternate name for G-Center.. G-Pack ???? G-Alarm is definitely one of the best WM software out there and I am sure I am not the only one who thinks so.&lt;/em&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5469185469425559567-5787695632957997279?l=blog.ageye.de'/&gt;&lt;/div&gt;</description><link>http://blog.ageye.de/2009/03/interview-for-1800pocketpccom.html</link><author>noreply@blogger.com (ageye)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5469185469425559567.post-6499716620750117805</guid><pubDate>Wed, 11 Mar 2009 17:35:00 +0000</pubDate><atom:updated>2009-03-11T19:06:08.935+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Programming</category><category domain='http://www.blogger.com/atom/ns#'>G-Watch</category><category domain='http://www.blogger.com/atom/ns#'>Windows Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Compact Framework</category><title>G-Watch 0.6 Preview</title><description>I know, I'm a pretty lazy blogger.&lt;br /&gt;&lt;br /&gt;I just wanted to show you that I'm really working :) Currently I'm developing my own controls to be more independent of the Windows Mobile controls... The result is pretty cool and because I'm so proud of bringing a new revolution to the Windows Mobile world, I couldn't wait for expo7 to finish his new icons and present you my first YouTube video ever showing something like a Diamond (yeah, I know - awful quality but I just don't have a good camera) starting a preview version of G-Watch 0.6 (old design though).&lt;br /&gt;As you can see the startup is a lot faster than the old one (one of the thousands benefits of my new engine). You won't see any Windows Mobile scrollbars or gray buttons - just smooth and fast animations, judder free scrolling of the lap times (please believe me - the blurred items I'm scrolling through are lap times :)) and absolute resolution &amp;amp; screen orientation - independent pages.&lt;br /&gt;&lt;br /&gt;Just a small description of what I'm showing because you probably can't recognize or read anything:&lt;br /&gt;1. Startup of G-Watch&lt;br /&gt;2. Stop watch screen (still with the old graphics)&lt;br /&gt;3. The new menu&lt;br /&gt;4. The options&lt;br /&gt;&lt;br /&gt;I've nearly finished the development of my engine which means that G-Watch 0.6 is only a few days before its release. Afterwards I will of course update G-Alarm and G-Profile (and maybe G-Light) to use this engine and will create G-Center which you have requested in my &lt;a href="http://forum.ageye.de/"&gt;forum&lt;/a&gt;...&lt;br /&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Z0WD_9kB9-g&amp;amp;hl=de&amp;amp;fs=1&amp;amp;color1=0x2b405b&amp;amp;color2=0x6b8ab6"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/Z0WD_9kB9-g&amp;amp;hl=de&amp;amp;fs=1&amp;amp;color1=0x2b405b&amp;amp;color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5469185469425559567-6499716620750117805?l=blog.ageye.de'/&gt;&lt;/div&gt;</description><link>http://blog.ageye.de/2009/03/g-watch-06-preview.html</link><author>noreply@blogger.com (ageye)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5469185469425559567.post-7987547472766171350</guid><pubDate>Wed, 18 Feb 2009 19:46:00 +0000</pubDate><atom:updated>2009-02-18T23:24:41.540+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Programming</category><category domain='http://www.blogger.com/atom/ns#'>Connections</category><category domain='http://www.blogger.com/atom/ns#'>Windows Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Compact Framework</category><title>Enable/disable WiFi with the .NET Compact Framework</title><description>In my first compact framework blog entry I want to show you how to programmatically enable and disable wifi on your device.&lt;br /&gt;When I started programming for Windows Mobile I was surprised how much isn't directly available in the .NET compact framework but has to be accessed with function calls in the coredll.dll. I thought that something basic like controlling the volume or enabling/disabling the phone/bt or wifi is easily to do... but it isn't.&lt;br /&gt;&lt;br /&gt;Here are the steps you have to perform to control the wifi device:&lt;br /&gt;1. Get the name of the wifi device. It is located in the registry: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State&lt;br /&gt;Because there are more than just one values we are looking for the first subkey in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State\Suspend which is on my device "{98C5250D-C29A-4985-AE5F-AFE5367E5006}"&lt;br /&gt;Now, to get the complete name, let's find the first value in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State which contains {98C5250D-C29A-4985-AE5F-AFE5367E5006}. This is on my Diamond "{98C5250D-C29A-4985-AE5F-AFE5367E5006}\TNETW12511"&lt;br /&gt;This may sound a bit unreliable but it worked on all devices I saw ;-)&lt;br /&gt;2. If we have found the correct name we call the coredll function SetDevicePower&lt;br /&gt;3. Because on iPAQ devices everything works different, we have to call some other functions as well: iPAQSetWLANRadio which is located in ipaqutil.dll&lt;br /&gt;&lt;br /&gt;Now here is the example:&lt;br /&gt;&lt;br /&gt;&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Runtime.InteropServices;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Win32;&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WifiTest&lt;/pre&gt;&lt;pre&gt;{&lt;/pre&gt;&lt;pre&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WiFiCtrl&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;        &lt;span class="preproc"&gt;#region&lt;/span&gt; PInvokes&lt;/pre&gt;&lt;pre&gt;        [DllImport(&lt;span class="str"&gt;"ipaqutil.dll"&lt;/span&gt;, SetLastError = &lt;span class="kwrd"&gt;true&lt;/span&gt;)]&lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;extern&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; iPAQSetWLANRadio(&lt;span class="kwrd"&gt;ref&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; status);&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;        [DllImport(&lt;span class="str"&gt;"iPAQUtil.dll"&lt;/span&gt;, SetLastError = &lt;span class="kwrd"&gt;true&lt;/span&gt;)]&lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;extern&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; iPAQGetWLANRadioStatus(&lt;span class="kwrd"&gt;ref&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; val);&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;        [DllImport(&lt;span class="str"&gt;"coredll.dll"&lt;/span&gt;, SetLastError = &lt;span class="kwrd"&gt;true&lt;/span&gt;)]&lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;extern&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; SetDevicePower(&lt;span class="kwrd"&gt;string&lt;/span&gt; pvDevice, &lt;span class="kwrd"&gt;int&lt;/span&gt; dwDeviceFlags, DevicePowerState DeviceState);&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;        [DllImport(&lt;span class="str"&gt;"coredll.dll"&lt;/span&gt;, SetLastError = &lt;span class="kwrd"&gt;true&lt;/span&gt;)]&lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;extern&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; GetDevicePower(&lt;span class="kwrd"&gt;string&lt;/span&gt; pvDevice, &lt;span class="kwrd"&gt;int&lt;/span&gt; dwDeviceFlags, &lt;span class="kwrd"&gt;ref&lt;/span&gt; DevicePowerState DeviceState);&lt;/pre&gt;&lt;pre&gt;        &lt;span class="preproc"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;enum&lt;/span&gt; DevicePowerState : &lt;span class="kwrd"&gt;int&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre&gt;            Unspecified = -1,&lt;/pre&gt;&lt;pre&gt;            D0 = 0, &lt;span class="rem"&gt;//Full power&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            D1,&lt;/pre&gt;&lt;pre&gt;            D2,&lt;/pre&gt;&lt;pre&gt;            D3,&lt;/pre&gt;&lt;pre&gt;            D4, &lt;span class="rem"&gt;//Unpowered&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; POWER_NAME = 1;&lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; POWER_FORCE = 4096;&lt;/pre&gt;&lt;pre&gt;        &lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetDeviceName()&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre&gt;            &lt;span class="rem"&gt;//Get the device name from the registry&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;string&lt;/span&gt; target = &lt;span class="str"&gt;""&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;            RegistryKey TheKey = Registry.LocalMachine.OpenSubKey(&lt;span class="str"&gt;"System\\CurrentControlSet\\Control\\Power\\State\\Suspend"&lt;/span&gt;, &lt;span class="kwrd"&gt;false&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (TheKey != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre&gt;                &lt;span class="kwrd"&gt;string&lt;/span&gt;[] subkey = TheKey.GetSubKeyNames();&lt;/pre&gt;&lt;pre&gt;                target = subkey.GetValue(0).ToString();&lt;/pre&gt;&lt;pre&gt;                TheKey.Close()&lt;/pre&gt;&lt;pre&gt;            }&lt;/pre&gt;&lt;pre&gt;            RegistryKey rk = Registry.LocalMachine.OpenSubKey(&lt;span class="str"&gt;"System\\CurrentControlSet\\Control\\Power\\State"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (rk != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre&gt;                &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt; items &lt;span class="kwrd"&gt;in&lt;/span&gt; rk.GetValueNames())&lt;/pre&gt;&lt;pre&gt;                {&lt;/pre&gt;&lt;pre&gt;                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (items.Replace(target, &lt;span class="str"&gt;""&lt;/span&gt;) != items)&lt;/pre&gt;&lt;pre&gt;                    {&lt;/pre&gt;&lt;pre&gt;                        rk.Close();&lt;/pre&gt;&lt;pre&gt;                        &lt;span class="kwrd"&gt;return&lt;/span&gt; items;&lt;/pre&gt;&lt;pre&gt;                    }&lt;/pre&gt;&lt;pre&gt;                }&lt;/pre&gt;&lt;pre&gt;                rk.Close();&lt;/pre&gt;&lt;pre&gt;            }&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;""&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;pre&gt;        &lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; IsEnabled()&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre&gt;            &lt;span class="rem"&gt;//Checks if the WiFi is enabled or disabled&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre&gt;                &lt;span class="kwrd"&gt;int&lt;/span&gt; i = -1;&lt;/pre&gt;&lt;pre&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (iPAQGetWLANRadioStatus(&lt;span class="kwrd"&gt;ref&lt;/span&gt; i))&lt;/pre&gt;&lt;pre&gt;                {&lt;/pre&gt;&lt;pre&gt;                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (i == 1)&lt;/pre&gt;&lt;pre&gt;                        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;                    &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (i == 0)&lt;/pre&gt;&lt;pre&gt;                        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;                }&lt;/pre&gt;&lt;pre&gt;            }&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; { }&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;string&lt;/span&gt; tmp = GetDeviceName();&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (tmp.Length &amp;gt; 0)&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre&gt;                DevicePowerState x = &lt;span class="kwrd"&gt;new&lt;/span&gt; DevicePowerState();&lt;/pre&gt;&lt;pre&gt;                GetDevicePower(tmp, POWER_NAME | POWER_FORCE, &lt;span class="kwrd"&gt;ref&lt;/span&gt; x);&lt;/pre&gt;&lt;pre&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (x == DevicePowerState.D0)&lt;/pre&gt;&lt;pre&gt;                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;                &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;            }&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;pre&gt;        &lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ToggleWifi()&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre&gt;            &lt;span class="rem"&gt;//Enables/Disables the WiFi device&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            &lt;/pre&gt;&lt;pre&gt;            &lt;span class="rem"&gt;//Default values -&amp;gt; Enable WiFi&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;int&lt;/span&gt; NewI = 1;&lt;/pre&gt;&lt;pre&gt;            DevicePowerState DevP = DevicePowerState.D0;&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (IsEnabled())&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre&gt;                &lt;span class="rem"&gt;//WiFi is already enabled -&amp;gt; disable it&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;                NewI = 0;&lt;/pre&gt;&lt;pre&gt;                DevP = DevicePowerState.D4;&lt;/pre&gt;&lt;pre&gt;            }&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre&gt;                iPAQSetWLANRadio(&lt;span class="kwrd"&gt;ref&lt;/span&gt; NewI);&lt;/pre&gt;&lt;pre&gt;            }&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            { }&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;string&lt;/span&gt; tmp = GetDeviceName();&lt;/pre&gt;&lt;pre&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (tmp.Length &amp;gt; 0)&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre&gt;                SetDevicePower(tmp, POWER_NAME | POWER_FORCE, DevP);&lt;/pre&gt;&lt;pre&gt;            }&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;pre&gt;    }&lt;/pre&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5469185469425559567-7987547472766171350?l=blog.ageye.de'/&gt;&lt;/div&gt;</description><link>http://blog.ageye.de/2009/02/enabledisable-wifi-with-net-compact.html</link><author>noreply@blogger.com (ageye)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5469185469425559567.post-4220344602583477790</guid><pubDate>Tue, 17 Feb 2009 22:41:00 +0000</pubDate><atom:updated>2009-02-17T23:46:02.498+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Programming</category><category domain='http://www.blogger.com/atom/ns#'>Windows Mobile</category><title>My new blog</title><description>Welcome!&lt;br /&gt;Yesterday I opened my &lt;a href="http://www.ageye.de"&gt;own forum&lt;/a&gt;, today I'm starting my own blog.&lt;br /&gt;&lt;br /&gt;I just wanted to do some Windows Mobile blogging which contains help for PocketPC developers. I know there are tons of blogs out there but if you're doing Windows Mobile programming it's so hard to find all the necessary information. For some problems I even needed months to find a solution...&lt;br /&gt;&lt;br /&gt;So basically this is a collection of my collected and own knowledge about doing some deeper interaction with Windows Mobile...&lt;br /&gt;&lt;br /&gt;Have fun with it! It will be filled soon!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5469185469425559567-4220344602583477790?l=blog.ageye.de'/&gt;&lt;/div&gt;</description><link>http://blog.ageye.de/2009/02/my-new-blog.html</link><author>noreply@blogger.com (ageye)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>
