Your Windows App Start Here!

MicrosoftYour App Starts here! Windows App Developer Workshops

Whether you want to develop Games or Apps we’ve got workshops for you! These free hands-on workshops are perfect for beginning developers and experienced coders alike. Get individual guidance on marketing and publishing your app or game. Who knows? Your app could entertain, educate or even change the world!

Seating is very limited – Registration is required for each workshop.
While you learn how to leverage well known open data APIs (such as Twitter, Meetup, Instagram, Edmunds and more) through our easy Starter Kits we’ll also show you how to approach marketing and publishing your app in the Windows and Windows Phone stores.
By attending a workshop you will:
1. Code Windows 8, Windows 8.1 and/or Windows Phone 8 apps by leveraging our APIMASH starter kits
2. Publish your apps to the Windows and Windows Phone stores
3. Market your app online and through social media to drive downloads

Workshop Agenda:

  • Hour 1 Presentation: Getting started with the Windows App Starter Kits
  • Hours 2 & 3 Code your app following our Hands-On Lab Workbooks and get expert, personal help with your project
  • Hour 4 Presentation: Marketing Apps 101

Refreshments will be served.

Here are our East Coast Events

Ft. Lauderdale http://aka.ms/g7j0jv
Malvern http://aka.ms/we6wac
Cambridge http://aka.ms/Svpnr6
Farmington http://aka.ms/wk7vu3
Alpharetta http://aka.ms/ftdday
Raleigh/Durham http://aka.ms/Ig4y8q
New York City http://aka.ms/lx5ief
Rochester http://aka.ms/oebikj
Reston http://aka.ms/j8tw7b

 

 

Microsoft Azure Developer Camps are Here!

WindowsAzureJoin a Microsoft Developer Camp and learn the critical skills that modern developers need to know. Take part in these hands-on workshops and get trained in the latest Microsoft development tools and technologies.

Discover the latest Windows Azure development environment. Explore Windows Azure websites and virtual machines using ASP.NET and Microsoft SQL Server to deploy Cloud Services.

Sharpen your skills on the Microsoft Modern Platform. Learn how to update an app to a Modern Architecture and configure and test a Modern Application.

All languages are welcome. Move your existing applications to the cloud using almost any language, framework, or tool. Register today for the event near you.

Getting Started with Windows Application Development

If you are a developer and have not heard about building apps for mobile devices then you must still be in a dark room with coffee and loud music. Apps are all the rage. Ranging from seasoned developers to 12 year old kids with a Mac. But how do you get started? Do you just start coding and submit? Sure. Well it is not that simple but there are some great tools to get a jump start on app development. This article will talk about a few ways to jump start your application development for the Windows 8 platform.

The Idea

Do you have one? Great. If not, there are plenty of ideas out there you just need to ignite the spark. What better way to ignite it with some starter kits. The Technical Evangelist team at Microsoft has created a bunch of “starter kits” that consume public API’s.

apimash StarterKits · GitHub

They range from the more popular Foursquare and Instagram to Chuck Norris and World of Warcraft. Download these, fire them up, and see how they can jumpstart your app idea.

More Help

Once you are up and running with your idea, you might need more help on location services or media access. There is a plethra of examples and kits over at the Windows Dev Center that can point you in the right directon or answer that question.

What Next?

In the next few weeks I will be sharing a starter kit along with my Windows Store app submission process. I have a great idea, the app will…wait…I can’t let you know yet.

🙂

 

Nokia 1020 Windows Phone

I have been an iPhone user for some time now. I had a 3GS and a 4S. I liked both of the phones. Good quality. Great app selection. Ease of use. Albiet some quirks but overall a great phone. However, when I start my new job in a few days it makes more sense that I have a Windows Phone. So I did a bit of research on what Windows Phone to get and the answer just kept coming back to the Nokia 1020. Recently launched. Great camera. Windows Phone 8. Why not? So I took the plunge.

My purchase journey is like the “normal” purchase path.

  1. Problem recognition – “I need to get a Windows Phone”
  2. Search – “The Verge, forums, Nokia website etc. all provided me info”
  3. Evaluation – “Do I want to save money and get last years phone or take the plunge and get the latest and greatest”
  4. Purchase decision – “Walk in the store. ATT.com or Microsoft Store online and get a free case”
  5. Post-Purchase – “Sweet! I got the phone…uh..did I make the right call?”

My Post-Purchase impressions where “wow, this is big”. I am coming from an iPhone 4S which is a great size. Fits in your hand, feels sturdy. This Nokia 1020 is much bigger. The weight of it is a little more but not too bad to notice. My second impression was the back of the phone. Being touted as teh next best camera since cameras were invented, you can tell right away that the camera is the focus of this phone. It protrudes from the back and will not allow the phone to lay flat.

Now, what runs through my mind is this is a major change or maybe buyers remorse. Not only from an operating system but from a physical and emotional stand point. My New England Patriots case won’t fit. My car charger. How will this hook up to my home stereo to play music? Will it fit in my pocket? My wife will kill me when she gets the credit card bill. Then my mind quickly goes to the features of the phone. What about my apps? How can I get the same ones on Windows Phone? My pictures? My contacts?

Well, that went away after about 3 minutes of using the Nokia 1020. The Windows Phone operating system is slick. Great transitions. Home screen that makes sense. Organize app icons super easy. So far so good.

My big question now is my contacts. Ugh. How will they come over. Well, I found this app called “Transfer My Data” (could not have a better name) and it just did that. Transfered my data. Wow. I had more issues transfering contacts from my iPhone 3GS to my iPhone 4S and that was using the same operating system!

My photos I just backed up so that was not a big deal, however there is an app that will send those over as well.

Now, apps. I read the internet and see “Windows Phone does not have any apps, that’s why no one uses it”. I was skeptical at first but I can honestly say you cannot believe everything you read on the internet.

Facebook, Foursquare, FoodSpotting, ESPN, Twitter, Spotify, Pandora, Untappd, Zite, Weather Channel, Netflix and Kindle. Check! They are all there. The one I am missing is Instagram but sounds like it is on its way. The biggest pain in installing these apps is remembering your usernames and passwords, but after that hurdle the fun began. Setting up the home screen icons!

I can honestly say after a day of using this phone I’m sold. This phone does not only have a great camera (which I never even talked about yet) but the Windows Phone operating system works well. App selection is not bad. I would even say pretty close to the AppStore. (How many tip calculators do you really need anyway?)

I have not used the camera enough to really comment on it, but the little I did use, it is awesome.

Overall the phone is great and if anyone is thinking of taking the plunge and switch from an iPhone or Android to Windows Phone, it is easier than you think.

[youtube_sc url=http://youtu.be/2vR4LeL0yzE]

 

Google Places for iOS 5 SDK

I am integrating the Google Places API into an iPhone app that I am building.  I found an existing library that uses Google Local Search but that is deprecated.  So I forked that solution and came up with Google Places Library.

As the story goes…when the application is configured to allow current location, the fun begins.

First configure your project to include the CoreLocation and the MapKit framework.  I am using a single view project for this example but it can be any project really.

In the RootViewController I need to define some delegates.  Since I will be embedding a UITableView and UISearchBar I need the following to be added: <UITextFieldDelegate, UITableViewDelegate, UITableViewDataSource, UISearchBarDelegate, CLLocationManagerDelegate, GooglePlacesConnectionDelegate>

UITableViewDelegate – will help populate the data on my table.

UISearchBarDelegate – will perform some interactions with the searching of places

CLLocationManagerDelegate – will get the location

GooglePlacesConnectionDelegate – will perform the main search

Once that is complete I can then add some outlets for my UI and set up some properties.

Lets move on to the meat and potatoes of this app.  Within the .m file I need to initialize some of my variables and get the GoogleConnection going.

Do not forget to set the url connection to nil in the viewDidUnload.

Lets move to the Location Manager methods.

The first one returns a location manager or creates one if necessary

The next method really starts the fun. In my case I am constructing a URL for the Google Places API. If you are not familiar with it you can find more about it here. The url takes the following parameters:

  • key: required – your API key
  • location: required – latitude/longitude around which to retrieve Place information. Location manager will help here
  • radius: required – distance in meters. For the initial search I have 500, for the UISearchBar I moved it out to 1000.
  • sensor: required – needs to be set to TRUE if came from a device with a location sensor
  • keyword: optional – a term to be matched if searching
  • language: optional – language codes
  • name: optional – term to be matched against the names of the Places
  • types: narrows the search to a specific type of place. Here is a list

At the end of all of this the url will look like this:

https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI

The last methods are the setting of the objects and some clean up.

I am not going to dive deep into the GooglePlacesConnection class or the GooglePlacesObject. However I will say this, the GooglePlacesObject is just that. An object of the Google Place. It has an init that will take the dictionary object from the JSON results. The GooglePlacesConnection does the work of constructing of the URL and issuing the request. One thing to note, the only error checking on the Google Place request is if there are 0 results or an error with the URL or request. There are other status codes if you want to add them in if needed.

Back into the RootViewController.m, we now should have a locations NSMutableArray so we can now populate our UITableView.

We set the count of the array to the number of rows in section. We then get the locations object at the indexPath and set that to a GooglePlacesObject and populate the cell.

To handle the UISeachBar here is the code:

The second, third and fourth method handle the interaction with the UISearchBar itself. Each calls the updateSearchString method and passes in the text from the search bar. updateSearchString performs a similar search to the location manager search, except it is passing in the search string as well. If you look in the GooglePlacesConnection method I am also expanding the search radius to 1000 from 500.

That is it. You can find the source on github.

My next update will be adding a ‘pull to refresh’.

Background Image Shrinking on iPad

Recently I was building a site that had full page backgrounds.  One of the pages had a long vertical background to accommodate the content.

Here is an example of what I am talking about:

Example (view on Desktop)

There really is not an issue (aside from image load) when viewing on Desktop browsers.  However, I would like this site to be compatible with the iPad as well.  Unfortunately this simple technique will not work on the iPad.

The iPad uses Mobile Safari which, by default, scales websites to fit it’s viewport.  It does this to text, images and background images.  It has to do with a resource limit put on the device from displaying large images.  The maximum number is 1024 x 1024 x 3 which is 3,145,728 (result varies a bit depending on iPhone or iPad).  However, Mobile Safari will scale your image accordingly to fit that size and your screen.

You will end up with something like this (view on iPad)

 

There is a simple fix and it has to do with some newer -webkit tags. Add the following to your body declaration in your CSS:

(where 1200 1900 is the size of your image)

This will only render on WebKit browsers and fix the issue of scaling.

See here (on iPad please)

This will force the iOS device to load the full background.

This tip will definitely be coming in handy again.

jQuery Accordion with 8 Lines of Code

Ok.  Maybe more than 8 lines of code but very little.  I have been working with another agency (that will rename nameless) on a mobile web site for a client of ours.  The agency provided the HTML/CSS/Images and Script for our technology team to implement.  We hook up all the back end and call it a day.

The section that came into question was an ‘accordion’ style UI for a set of FAQ’s and other content.  When I first loaded up their pages, everything worked fine.  Upon further inspection of their code I noticed a lot of JavaScript libraries that were not needed.  They included jQuery AND Prototype along with some effects and accordion scripts.  (Prototype alone is almost 100kb in file size and the other scripts were 42kb.  That still does not include the 70kb for jQuery)  I thought to myself, this is a mobile site…why have extra scripts if not needed.  To make matters even more funny, we are supporting Mobile Safari (iOS), Mobile Chrome (Android) and the BlackBerry Browser (RIM), it does not work in BlackBerry at all.  Forget enabling or disabling JavaScript it just does not work.  Even the elements are hidden.

So it got me thinking about the old saying, “if you want something done right you have to do it yourself”.  So I did.

I removed all the libraries except for jQuery and made all of the elements visible by default.  Basically if a user does not have JavaScript enabled then they can see everything.

Here is my HTML

Styles and other HTML can be wrapped around it. You can change the paragraph tags to div’s if needed but that is the structure you need more or less.

Now for the JavaScript.

Make sure you embed jQuery (I did from Google)

Then hide all open content containers:

If the element does not have the ‘current’ class then we need to first remove the ‘old’ ‘current’, close the ‘old’ ‘current’ and open and set the new ‘current’.

Done.

Here is the final:

Depending on how you format the code and what you count as a ‘line’ it can be about 8 lines 🙂

Updated GitHub Repository

Demo here – View in Mobile Browser.  Desktop browser will work as well.  Works on iOS, Android, BlackBerry.