Droidcon 2013 automotive quality dunca_czol_garmin
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
932
On Slideshare
902
From Embeds
30
Number of Embeds
1

Actions

Shares
Downloads
7
Comments
0
Likes
0

Embeds 30

http://de.droidcon.com 30

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Automotive quality for mobile productsStefan Dunca, Ernest CzolGARMIN, 06.03.2013
  • 2. Outlineo NAVIGON Mobile Navigatoro Hybrid Android Application (Native & Java)o Development Tools & Helperso Challengeso Performance for low end deviceso Developing aids for such complex projecto Flexibility & scalabilityo Android platform segmentation
  • 3. Application coverage
  • 4. Variaty of features Support forxxhdpi Amazon shop Glympse andFoursquareintegration UrbanGuidance
  • 5. Hybrid approach: Java GUI & C++ coreCore Components (C++)Router NameBrowserAdvisor MapDrawerTrafficTMC …JNIGPSAccelerometerTiltConnectedServices
  • 6. Mobile Navigator Starting Point• Initially designed forautomotive• Simple interfaces forfast development• Reduce client sidedevelopment effort• Knowledgesharing/reusingbetween platforms• Brought automotivequality to mobileContent DataCore LibraryCore APICustom HMIOS
  • 7. Reality ViewTunnels &BridgesPerformance gain by using native approach• Complex algorithms• Complex routingsupport• Hardware accelerateddrawing• TTS Housenumber infoSound dataPOI• Huge content size• Data compression andoptimization• Efficiently pre-compileddata formatCountry info3D DataTerrainelevationStreetlines
  • 8. Cross platform coreC++
  • 9. Core release distribution• Cmake• Compiler independent• Same build scripts• Just different compiler paths• Jenkins as build server• Excellent platform independent build server system• Support for OS independent nodes:• Linux• Windows
  • 10. Native Core Integration• JNI mapping• Existing native API• Core API hooks• C++ classes to Objects• Allows us to implement RPC protocolCore Components (C++)Router NameBrowserAdvisor MapDrawerTrafficTMC …JNI
  • 11. RPC over Core API• Remote calls to Core code via a custom RPCover TCP/IP.• Light binary protocol• Application is in control• Act as separation layer between C++ core andAndroid native Java implementation• Can record for issue replays• Replay using desktop dev-tool
  • 12. Java HMI – single process architectureJava ProxyImplementationCore ServerCore LibraryCore ServerStream IOJNIAPI (Java)Java HMIAPIJava Proxytranslates HMIfunction calls into adata stream whichis passed to asingle JNI function.Core Server Librarydecodes HMI functioncalls.Similar architecture also validwith C# and COM on otherplatforms• C++ remote implementation of interfacesthat acts as a proxy to the actualimplementation
  • 13. Core Library multi process architectureCore Proxy LibraryServer ApplicationCore Library &actualimplementationCore ServerStream IOCore ProxyStream IOTCP/IPHMIAPIAPIAPICore Proxy interacts between HMI andCore to separate the HMI process frommain process.Proxy encodesHMI function calls.Core Server decodesHMI function calls.
  • 14. Java HMI – multi process architectureJava Proxy(Package)Native Core LibraryCore LibraryCore ServerStream IOJNIJava HMIJava ServerApplicationTCP/IPActual APIimplementationAPI (Java)Java Proxytranslates HMIfunction calls into adata stream whichis passed toJavaServerApplication viaTCP/IP.Java ServerApplication passes thedata stream to JNI.Similar architecture also valid with C#and COM on other platforms
  • 15. Logging modeLog PlayerApplicationCore NativeLibraryCore ServerStream IOLog PlayerCore APIFile IOPlayback of HMI callsbinary log-file.Application withCore loggingenabledCore NativeLibraryCore ServerStream IOCore proxyCore APIFile IORecording of HMI callsto binary log-fileconsidering relativetime-stamps.HMIAPI
  • 16. 3D City Models & Landmarks
  • 17. Open Gl ES• Replaced software rendering• Better user experience• Advantages:• Increase drawing performance• Already tested on other platforms• Immersion into the city landscape• Disadvantages:• Opengl ES 2 for better texture filtering• Small issues encountered on the way
  • 18. Open GL integration challenges• GlEs1.0 have limitations• GlEs2.0 is available only from 2.2• NativeActivity only from 2.3• Native drawing thread• Sync needed between Java side and native side• Device specific issues• Some have Open GL emulation• Some have bad support
  • 19. Software vs OpenGL
  • 20. Android Challenges• Supporting the full range of screen sizes• Same code base, same APK• ldpi, mdpi, hdpi, xhdpi, xxhdpi• small, normal, large, extra large
  • 21. Android Challenges• Supporting the full range of screen sizes• Same code base, same APK• ldpi, mdpi, hdpi, xhdpi, xxhdpi• small, normal, large, extra large
  • 22. Android Challenges• Supporting the full range of screen sizes• Same code base, same APK• ldpi, mdpi, hdpi, xhdpi, xxhdpi• small, normal, large, extra large
  • 23. Android Challenges• Supporting the full range of screen sizes• Same code base, same APK• ldpi, mdpi, hdpi, xhdpi, xxhdpi• small, normal, large, extra large
  • 24. Android Challenges• Supporting the full range of screen sizes• Same code base, same APK• ldpi, mdpi, hdpi, xhdpi, xxhdpi• small, normal, large, extra large
  • 25. Android Challenges• Supporting the full range of screen sizes• Same code base, same APK• ldpi, mdpi, hdpi, xhdpi, xxhdpi• small, normal, large, extra large
  • 26. Android Challenges• Reduce APK size• Requested by device manufacturers and operators• Solutions:• Download image resource set from content server• Using LruCache for faster image loading• (introduced in API 12, but added to Android Support library)
  • 27. // Get max available VM memoryfinal int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);Sample code taken from http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html
  • 28. // Get max available VM memoryfinal int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);// Use 1/5th of the available memory for this memory cache.final int cacheSize = maxMemory / 5;Sample code taken from http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html
  • 29. // Get max available VM memoryfinal int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);// Use 1/5th of the available memory for this memory cache.final int cacheSize = maxMemory / 5;LruCache<String, Bitmap> mMemoryCache =new LruCache<String,Bitmap>(cacheSize);Sample code taken from http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html
  • 30. // Get max available VM memoryfinal int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);// Use 1/5th of the available memory for this memory cache.final int cacheSize = maxMemory / 5;LruCache<String, Bitmap> mMemoryCache =new LruCache<String, Bitmap>(cacheSize) {@Overrideprotected int sizeOf(String key, Bitmap bitmap) {// The cache size will be measured in kilobytes rather than// number of items.return bitmap.getByteCount() / 1024;}};Sample code taken from http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html
  • 31. Thank you!Q?