180 likes | 289 Views
Digging for gold. Eric Neff Director of Mobile Innovations eneff@kieferconsulting.com. Outline. Common Native Features. Social Integration At Rest Interaction Notifications Calendar Contacts/Address Book. Social integration. iOS Github.com/ ShareKit Facebook and Twitter DEMO.
E N D
Digging for gold Eric Neff Director of Mobile Innovations eneff@kieferconsulting.com ca.gov/mobile bit.ly/govmo2013
Common Native Features • Social Integration • At Rest Interaction • Notifications • Calendar • Contacts/Address Book ca.gov/mobile bit.ly/govmo2013
Social integration • iOS • Github.com/ShareKit • Facebook and Twitter DEMO ca.gov/mobile bit.ly/govmo2013
Social integration • Android • Sharing API using Intents and ShareActionProvider • Share or Context Menu • setShareIntent ca.gov/mobile bit.ly/govmo2013
Social integration • Windows • Share Contracts – Windows 8 • DataTransferManager • Share Targets • Data Formats in Manifest • Launchers – WP8 ca.gov/mobile bit.ly/govmo2013
At Rest interactions • iOS – Not Supported • Android • Widgets Demo • Windows • Live Tile Demo Not to be confused with local and server based push notifications ca.gov/mobile bit.ly/govmo2013
Calendar & contacts • iOS • Native API • Android • CalendarContract & ContactsContract 4.0 + • OEM Specific Implementations • Windows • SaveContactTask ca.gov/mobile bit.ly/govmo2013
browsers • iOS • Native Safari – 386* • Chrome, Firefox, etc… • Android • OEM Specific – 297* (Samsung Galaxy Nexus) • Chrome, Opera, etc… • Windows • IE10 – 320* * source html5test.com ca.gov/mobile bit.ly/govmo2013
Camera • Native Web APIs from All • Opera Next & Chrome Canary <video id="video" width="640" height="480" autoplay></video> <button id="snap">Snap Photo</button> <canvas id="canvas" width="640" height="480"></canvas> document.getElementById("snap").addEventListener("click", function() { context.drawImage(video, 0, 0, 640, 480); }); DavidWalsh.name/browser-camera ca.gov/mobile bit.ly/govmo2013
Audio • Native Access Through all Platforms //iOS Play NSURL *soundURL = [[NSBundlemainBundle] URLForResource:@"sample" withExtension:@"caf"]; AudioServicesCreateSystemSoundID((CFURLRef)soundURL, &sound1); //iOS Record AVAudioSession *audioSession = [AVAudioSessionsharedInstance]; recorder = [[ AVAudioRecorderalloc] initWithURL:urlsettings:recordSetting error:&err]; [recorder recordForDuration:(NSTimeInterval) 10]; ca.gov/mobile bit.ly/govmo2013
//Android Play mp= MediaPlayer.create (this, R.raw.sound); // sound is for example your mp3 song mp.start (); //Android Record mediaRecorder = new MediaRecorder(); mediaRecorder.start(); //WP8 Play BackgroundAudioPlayer.Instance.Play(); //WP8 Record microphone.BufferDuration = TimeSpan.FromMilliseconds(500); buffer = new byte[microphone.GetSampleSizeInBytes(microphone.BufferDuration)]; microphone.Start();
Sensors • Geolocation, Accelerometer, NFC, Light Sensor • User Opt-in • New in iOS • Declared Capabilities • iOS • Guaranteed set of sensors • Android • Must test for capabilities • Windows • Most sensors guaranteed ca.gov/mobile bit.ly/govmo2013
Storage • Unlimited Local Storage • Limited by size • Windows • Roaming 100KB • Test for capabilities • SQLite • All platforms • HTML5 • Offline storage ca.gov/mobile bit.ly/govmo2013
Other • Portability • Embedded Mobile • PhoneGap • Icenium • Cross Compiled • Mono • Touch • Droid • Security • Bandwidth Considerations ca.gov/mobile bit.ly/govmo2013
Q&A A trusted partner of the state www.kieferconsulting.com Ca.gov/mobile bit.ly/govmo2013