• Like
Porting Hotels.com to Nokia X
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Porting Hotels.com to Nokia X

  • 225 views
Published

Sharing my experience and learnings from porting our Hotel.com to the Nokia X platform as a pre-release partner with Nokia

Sharing my experience and learnings from porting our Hotel.com to the Nokia X platform as a pre-release partner with Nokia

Published in Technology
  • 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
225
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

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. 1 Porting to Nokia X Maciej Matyjas – Mobile Technology Lead - @matyjas
  • 2. 2 Porting to Nokia X • About Me • About Nokia X • Secret Devices and NDAs • Firmware Updates • Go AOSP • Here™ Maps for Google Maps v1 • Here™ Maps for Google Maps v2 • Analytics • Publishing & Proguard • Wrap up
  • 3. 3 About Me • Does not work for Nokia© • Pisces • Shipped Meego apps • Enjoys long walks on the beach
  • 4. 4 About Nokia X • AOSP • Plus • Single back button • Nokia Here Maps • Nokia In-App Payments • Nokia Notifications • Fastlane UI
  • 5. 5 About Nokia X‟s Fastlane UI
  • 6. 6 About Nokia X • No GMS • Targets users between Asha and Lumia ranges • Combines aspects of • Asha • Meego • WinPhone • Android
  • 7. 7 Secret Devices and NDAs • Need to know basis • Identifying allies • Chinese walls • Stealthy intelligence gathering • Cloak and dagger with the Analytics team • Is our Build Manager a double agent?
  • 8. 8 Firmware Updates • Constantly updating firmware • Reconnect to network, enable location, etc • Always a little worried of brickwareing • Never sure if it was something I did or the firmware • “Blame it on the firmware, cos the firmware don‟t care”
  • 9. 9 Port that App
  • 10. 10 Go AOSP • Make sure your „Project Build Target‟ is AOSP • Ship?
  • 11. 11 Here Maps for Google Maps v1 • Manifest mods • Add “com.google.android.maps.sdk.jar” from Nokia • Make sure its exported with your .apk file • Ship?
  • 12. 12 Here Maps for Google Maps v2 • Not moving as quickly as Google‟s releases • Same manifest mods • Replace Google Play Services library project with reference_v2_lib • Add isMapsV2EquivalentAvailable() to our GooglePlayServicesChecker.java • Few cases where initialization order differs to Google‟s Maps v2
  • 13. 13 Here Maps for Google Maps v2 public void add(GoogleMap map, MarkerDataHolder holder) { … // mm:: visible region might be null if this is // called before map is visible if ((map.getProjection().getVisibleRegion() != null) && (map.getProjection().getVisibleRegion() .latLngBounds.contains(position))) { markers.add( map.addMarker(holder.getMarkerOpts())); } }
  • 14. 14 Here Maps for Google Maps v2 // mm:: particularly insidious since on bg if (map.getProjection().getVisibleRegion() != null) { LatLngBounds bounds = map.getProjection() .getVisibleRegion() .latLngBounds; … }
  • 15. 15 Here Maps for Google Maps v2 @Override public View getInfoWindow(Marker marker) { … // mm:: this works around an issue // rendering InfoWindows on Here maps mContents.setLayoutParams( new ViewGroup.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); return mContents; }
  • 16. 16 Here Maps for Google Maps v2 • That is it! • Lets demo
  • 17. 17 Here Maps for Google Maps v2
  • 18. 18 Here Maps for Google Maps v2
  • 19. 19 Here Maps for Google Maps v2
  • 20. 20 Analytics 1. Debrei Tamás: open config.xml in hotels-logic- library 2. Debrei Tamás: <confvalue key = "APP_STORE_NAME" value = "GOOGLE"/> 3. Debrei Tamás: replace GOOGLE with NONBRAND
  • 21. 21 Publishing & Proguard • A little tricky due to maps wrappers • Couldn‟t exactly Google for „Nokia secret Android platform maps wrapper Proguard setup‟ • Or ask on Stack Overflow • But Nokia support was terrific
  • 22. 22 Publishing & Proguard # here maps -keep class com.nokia.** { *; } -keep interface com.nokia.** { *; } -dontwarn com.nokia.** -keep class com.here.** { *; } -keep interface com.here.** { *; } -dontwarn com.here.** # u might also need to tell Proguard to leave the wrapper API intact w/: -keep class com.google.android.gms.maps.** { *; } -keep interface com.google.android.gms.maps.** { *; } -dontwarn com.google.android.gms.maps.** # here maps v1 -keep public class com.google.android.maps.Projection -dontwarn com.google.android.maps.PixelConverter -dontwarn com.google.android.maps.MapView -keep class com.google.** -dontwarn com.google.**
  • 23. 23 Wrap Up • Easiest is if you have no Google dependencies • Easy if you just use Google Maps v1 • Maps v2 makes it a bit harder • Probably harder still the tighter you are tied to Google • Consider a generic maps solution
  • 24. 24 Questions? Maciej Matyjas – Mobile Technology Lead - @matyjas
  • 25. 25