1
Porting to Nokia X
Maciej Matyjas – Mobile Technology Lead - @matyjas
2
Porting to Nokia X
• About Me
• About Nokia X
• Secret Devices and NDAs
• Firmware Updates
• Go AOSP
• Here™ Maps for Go...
3
About Me
• Does not work for Nokia©
• Pisces
• Shipped Meego apps
• Enjoys long walks on the beach
4
About Nokia X
• AOSP
• Plus
• Single back button
• Nokia Here Maps
• Nokia In-App Payments
• Nokia Notifications
• Fastl...
5
About Nokia X‟s Fastlane UI
6
About Nokia X
• No GMS
• Targets users between Asha and Lumia ranges
• Combines aspects of
• Asha
• Meego
• WinPhone
• A...
7
Secret Devices and NDAs
• Need to know basis
• Identifying allies
• Chinese walls
• Stealthy intelligence gathering
• Cl...
8
Firmware Updates
• Constantly updating firmware
• Reconnect to network, enable location, etc
• Always a little worried o...
9
Port that App
10
Go AOSP
• Make sure your „Project Build Target‟ is AOSP
• Ship?
11
Here Maps for Google Maps v1
• Manifest mods
• Add “com.google.android.maps.sdk.jar” from
Nokia
• Make sure its exporte...
12
Here Maps for Google Maps v2
• Not moving as quickly as Google‟s releases
• Same manifest mods
• Replace Google Play Se...
13
Here Maps for Google Maps v2
public void add(GoogleMap map,
MarkerDataHolder holder) {
…
// mm:: visible region might b...
14
Here Maps for Google Maps v2
// mm:: particularly insidious since on bg
if (map.getProjection().getVisibleRegion()
!= n...
15
Here Maps for Google Maps v2
@Override
public View getInfoWindow(Marker marker) {
…
// mm:: this works around an issue
...
16
Here Maps for Google Maps v2
• That is it!
• Lets demo
17
Here Maps for Google Maps v2
18
Here Maps for Google Maps v2
19
Here Maps for Google Maps v2
20
Analytics
1. Debrei Tamás: open config.xml in hotels-logic-
library
2. Debrei Tamás: <confvalue key =
"APP_STORE_NAME" ...
21
Publishing & Proguard
• A little tricky due to maps wrappers
• Couldn‟t exactly Google for „Nokia secret
Android platfo...
22
Publishing & Proguard
# here maps
-keep class com.nokia.** { *; }
-keep interface com.nokia.** { *; }
-dontwarn com.nok...
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 ...
24
Questions?
Maciej Matyjas – Mobile Technology Lead - @matyjas
25
Upcoming SlideShare
Loading in …5
×

Porting Hotels.com to Nokia X

452 views
373 views

Published on

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
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
452
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Porting Hotels.com to Nokia X

  1. 1. 1 Porting to Nokia X Maciej Matyjas – Mobile Technology Lead - @matyjas
  2. 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. 3 About Me • Does not work for Nokia© • Pisces • Shipped Meego apps • Enjoys long walks on the beach
  4. 4. 4 About Nokia X • AOSP • Plus • Single back button • Nokia Here Maps • Nokia In-App Payments • Nokia Notifications • Fastlane UI
  5. 5. 5 About Nokia X‟s Fastlane UI
  6. 6. 6 About Nokia X • No GMS • Targets users between Asha and Lumia ranges • Combines aspects of • Asha • Meego • WinPhone • Android
  7. 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. 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. 9 Port that App
  10. 10. 10 Go AOSP • Make sure your „Project Build Target‟ is AOSP • Ship?
  11. 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. 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. 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. 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. 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. 16 Here Maps for Google Maps v2 • That is it! • Lets demo
  17. 17. 17 Here Maps for Google Maps v2
  18. 18. 18 Here Maps for Google Maps v2
  19. 19. 19 Here Maps for Google Maps v2
  20. 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. 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. 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. 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. 24 Questions? Maciej Matyjas – Mobile Technology Lead - @matyjas
  25. 25. 25

×