Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Windows Phone WWC

Windows Phone WWC

David Spence

April 28, 2015
Tweet

More Decks by David Spence

Other Decks in Programming

Transcript

  1. Welcome    [email protected]    @big_spenc   •  Contact  me  any6me

      •  If  you  want  me  to  slow  down,  explain  something,   repeat  anything,  or  if  I'm  just  geAng  sidetracked,   please  shout!   •  Be  interac6ve,  ask  ques6ons,  be  curious!   •  “I  don’t  know  what  it’s  like  for  Android  and  iOS   but…”  
  2. Ques6ons  for  you   •  Who  am  I  talking  to?

      •  What's  the  phone  split  in  the  room?   •  Who  has  done  any  mobile  dev?   – Android  /  iOS  /  Windows  Phone  /  other?   •  What  were  the  pain  points?   – Setup?  Unfamiliar  language?  Documenta6on?   Emulators?  
  3. Why  Windows  Phone?   •  Microso^  fan!   •  Free

     for  students   •  Familiarity  with  C#  
  4. Why  did  I  bother?   •  I  wanted  apps  which

     didn’t  exist  for  my  phone   •  My  apps  simply  expose  data  from  popular   websites  which:   – I  use   – have  great  APIs   •  These  services  do  have  apps  for  iPhone  and   Android  
  5. Stack  Mate   •  778  downloads  (~5  per  day)  

    •  Free   •  Available  for  ~2  years  
  6. Straza  Mate   •  5000  downloads  (~25  per  day)  

    •  Free  trial  /  £0.79   •  Available  for  ~6  months  
  7. What  I’ve  found   •  Need   – Op6on  to  rate

     and  review   •  (app  camp)   – Op6on  to  send  feedback  /  bugs   •  (77  mails  so  far,  just  for  Straza  Mate)   •  People  will  rate  1*  or  5*   •  If  you  respond  to  people,  they  change  their   opinions  very  quickly   •  Rank  can  vary  a  lot,  upda6ng  o^en  helps  
  8. The  Store        $19  one  off  payment  

           $25  one  off  payment          $99  per  year   •  You  keep  70%  of  sales   •  Required  to  debug  on  a  device  
  9. The  Store   •  Download  reports   •  Crash  reports

     (with  stack  traces)   •  In  app  purchases   •  Reviews   •  Promo6onal  op6ons  
  10. Before  developing   •  Whatever  plarorm  you  choose,  please  make

      your  app  fit  with  the  general  theme  of  the   device!  
  11. Before  developing   •  Read  the  guidelines   – e.g.  loca6on

      •  Watch  out  for  phone  themes   – Decide  if  you  s6ck  to  branded  colours  or  mix  with   phone  themes  
  12. Use  built  in  localiza6on  formats   – Dates   •  GB

     English    13/08/98   •  US  English    08-­‐13-­‐98   •  French      13/08/1999   •  Spanish      13-­‐08-­‐98   – Numbers   •  GB/US  English    4,295.00   •  French        4  295,000   •  Spanish        4.295,000  
  13. e.g.  Dates   •  ToString(“d”)      short  date  paxern

      –  6/15/2009  (en-­‐US)   –  15/06/2009  (fr-­‐FR)   •  ToString(“D”)    long  date  paxern   –  Monday,  June  15,  2009  (en-­‐US)   –  15  июня  2009  г.  (ru-­‐RU)   •  ToString(“g”)    general  date/6me  paxern   –  6/15/2009  1:45  PM  (en-­‐US)   –  15/06/2009  13:45  (es-­‐ES)  
  14. Get  the  tools   •  Windows  machine   •  SDKs

     for  current  and  previous  versions  of  WP   – hxps://dev.windows.com/en-­‐us/develop/ download-­‐phone-­‐sdk     •  Get  the  essen6als  from   – Microso^.Net.Hxp   – Newtonso^.Json   – Windows  Phone  toolkit  
  15. Emulator   •  To  use  the  emulator  for  >=WP8  apps

     you  will   need:   – 64-­‐bit  version  of  Windows  8  Pro  edi6on  or  higher   – enable  Hyper-­‐V   •  So  I  just  use  a  device...  
  16. Remember  to  declare  capabili6es   •  Remember  to  check  the

     boxes  you  need  in   WMAppManifest.xml  
  17. Otherwise  this  won’t  work!   Geolocator geolocator = new Geolocator();

    geolocator.DesiredAccuracyInMeters = 50; Geoposition geoposition = await geolocator.GetGeopositionAsync( maximumAge: TimeSpan.FromMinutes(5), timeout: TimeSpan.FromSeconds(10) );
  18. Integrate  with  the  system!   •  Launchers   –  launch

     a  “share  link”  task   –  launch  map  with  start  and  end  points   –  launch  the  web  browser  at  a  certain  page   •  Choosers  (returns  to  the  app  a^er  the  task)   –  choose  a  photo  from  your  photo  library   –  camera  capture  task   •  hxps://msdn.microso^.com/en-­‐us/library/windows/ apps/ff769542(v=vs.105).aspx  
  19. Simple  launcher   SmsComposeTask smsComposeTask = new SmsComposeTask(); smsComposeTask.To =

    "2065550123"; smsComposeTask.Body = "Try this new application."; smsComposeTask.Show();
  20. Let’s  go!   •  Open  Visual  Studio   – File  >

     New  Project   – Choose  project  template  >  OK   – Set  emulator   – F5  
  21. Ques6ons?   •  Some  useful  libraries:   – MVVM  Light  

    – Nokia  Imaging  SDK   – Live  SDK   – Sparrow  Charts