SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
Lonel Labit
Manager
Regional Map & Content, APAC
lonel.labit@here.com
HERE, A Nokia Company
HERE SOFTWARE DEVELOPMENT KIT FOR ANDROID
What is the HERE SDK for Android?
© 2014 HERE | HERE BRIEFING | COMPANY CONFIDENTIAL
The HERE SDK for Android provides a set of programming
interfaces that enable developers to build immersive,
geographically aware Android applications by leveraging a
powerful and flexible mapping platform.
What are the Features of the HERE SDK for Android?
© 2014 HERE |
55
Map Display
• Client-site map rendering using vector data
• Dynamic map download
• 214 countries in
• 54 languages
• Maps preload for offline usage
• Map styles: normal, night, transit etc.
• Map display of >15,000 textured 3D landmarks
• Touch screen gestures: pan, flick, pinch zoom, rotate, tilt etc.
• Map overlay of objects such as polylines, polygons, icons,
routes.
• Map overlay of custom raster tiles (e.g. for heat maps)
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
66
Venue Maps
• Feature rich maps of shopping malls, train stations and airports
• Shading and labeling of detailed spaces (e.g stores, restaurants)
• Indication of facilities including restrooms, ATMs, escalators,
elevators, etc.
• Selectable user interface
• Tap-on capability for retrieval of venue information
• Switcher floor capability for venues and display of current floor
• Searchable directory of stores and facilities
• 18,000 venues in 41 countries
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
77
3D Maps and Street Level Imagery
3D Maps
• 3D map display in 3D
• 3D landmarks display
Street Level Imagery
• Panoramic (360-degree) street level imagery for >90 cities
• Imagery as Internet map enhancement service
• Support for search and visualization use cases
• High-resolution view of key features, tourist attractions,
historical locations and commercial centers
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
88
Traffic
Real-time traffic display on the map
• Traffic flow for >30 countries
• Color coded traffic flow:
Green - Normal
Amber - High
Red - Very High
Black - Stalling
• Traffic incidents for >20 countries
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
99
Touch screen gestures
HERE SDKs are optimized for touch devices and
interfaces supporting a variety of touch
gestures:
• Panning or free drag
• Swipe or kinetic flick
• Pinch / spread to zoom
• Single tap
• Double tap
• Two-finger tap
• Two-finger vertical drag
• Two-finger rotate
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
1010
Directions
• Get driving directions for >90 countries
• Driving directions taking real-time traffic conditions into
account
• Pedestrian directions using walkways (e.g. stairs, ramps)
• Public Transit directions using timetables for >400 cities
• Routing options
• type (fastest/shortest)
• avoid options (toll roads, motorways, parks etc.)
• Offline route calculation
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
1111
Places and Search
Places
• > 75 million places available
• Explore places by categories
• Explore places details (images, ratings, reviews, editorials etc.)
Search
• Geocoding
• Reverse Geocoding
Offline mode for Places search, Geocoding, Reverse Geocoding
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
12
Hybrid Engine Functionality
• HERE maps rendering independent of data connection
• Map data preload for all countries/regions. Map data is highly compressed
vector data => keeping size requirements to a minimum
• E.g. California ~200MB, complete world ~14GB
• HERE Cloud on-demand map data download where map data wasn’t already
preloaded
• HERE Cloud on-demand download of non-vector maps such as Satellite and
Terrain, Street Level Imagery and custom map stiles - requires data
connection
• Route calculation, search for places, geocoding and reverse geocoding
capabilities available with no data connection
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
13
Live Sight
• Track position of device in space and animate view accordingly
• Seamless transitions from Map to LiveSight and back again
• Gesture support allows the user to interact with content, custom gestures can
also be defined
• Content transitions and interaction are animated using hardware acceleration
• "Radar" UI support, which provides the user with more context regarding their
position relative
to content
• Highly configurable LiveSight engine allows the user experience to be
customized
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
14
Favourites – Make Your Personal Map on the Go
Collect the places you’d like to visit again as
favourites so they are always at your fingertips and
finding them is a snap - in any HERE app.
15
How to get started?
Go to www.developer.here.com
Click Sign in/Register
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
16
How to get started?
Create an APP
Select:
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
17
How to get started?
Keep your APP_ID and Code!
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
18
Download the SDK at this link:
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
http://1drv.ms/Vn9CGG
19
Serious Coding Stuff…. Coming Ahead…. >_<
HERE Philippines Mapping Operations at San Pablo Laguna.
20
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
4 Easy Steps to do this:
21
Creating a Simple Application
First things first – Setup your emulator
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
Note: Please set a 200-300 MiB SD Card Space
and check User Host GPU
22
Creating a Simple Application
First things first – Install Mapsservice-release.apk
in your android device/emulator
The apk is in the apk folder.
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
Note: The HERE SDK supports Android 2.3.3 or
higher. However, for application targeting
as low as Android SDK version 2.3.3 to 2.3.7,
MapFragment is supported through the use
of
com.here.android.mpa.mapping.MapComp
atibilityFragment and the Android
Support Package (
http://developer.android.com/tools/extras/support
-library.html ). For more
details, refer to
http://developer.android.com/tools/extras/support
-library.html#Using
23
Creating a Simple Application
What do we want to achieve in this topic?
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
• Pan around the map to view different geographical regions
• Center the map on a specific part of the viewable area using
standard Android single-tap
gestures
• Zoom in and out using standard Android pinch-to-zoom, double-
tap, or two-finger tap
• Rotate the map using standard Android two-finger rotate gestures
• Tilt the map using standard Android two-finger tilt gestures
24
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
1. From the Eclipse menu, select New > Android Application Project to open the New Android App
dialog (or click from the toolbar)
2. In the New Android Application dialogue, under Application Name, specify an appropriate
application name (The remainder of this tutorial will refer the application name as
HelloHEREMaps)
3. Under Project Name, specify an appropriate project name
4. Under Package Name, specify an appropriate package name (For example,
com.mapstutorial.helloheremaps. This is the package name that this tutorial will use)
5. Under Minimum Required SDK, select the lowest version of the Android SDK you wish to support.
For this sample application, we will use Android 3.0
25
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
6. Under Target SDK, select your target Android SDK version with API level 14 (Ice Cream Sandwich
4.0.1) or above
7. Click Next
8. Click Next to use the default icons
9. On the Create Activity dialog box, select Blank Activity and click Next
10. Click Finish
Result: A new project will appear within the Eclipse
Package Explorer, which will expand to show the
location of the activity_main.xml file. The file itself will be
opened in the main editor view, in Graphical
Layout mode for adding and editing UI elements.
26
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
We need to Add HERE Libraries to the project and add it to the build path
After creating the skeleton of your new application, add the HERE SDK resources as follows:
1. From the directory where you installed the HERE SDK, copy the contents of the HERE-sdk/libs/
folder to your project's libs/ folder.
2. In your Eclipse project's libs/ folder, right-click the HERE-sdk.jar file and select Build Path >
Add to Build Path.
27
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
We need to Add HERE Libraries to the project and add it to the build path
Edit AndroidManifest.xml
With resources added to your project, the next stage of creating an application with the HERE SDK is
to edit the project's AndroidManifest.xml file to specify Android permissions as follows:
1. From the Package Explorer, double-click your project's AndroidManifest.xml file to open it for
editing.
2. At the bottom of the editor view that displays the manifest, click the AndroidManifest.xml tab to
switch the file's view to text editor mode.
3. Add the following markup beneath the <uses-sdk/> tag:
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission
android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
28
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
We need to Add HERE Libraries to the project and add it to the build path
4. Within the <application></application> block of tags, add the following markup directly
beneath the <activity></activity> tag:
<meta-data android:name="com.here.android.maps.appid"
android:value="YOUR APP ID"/>
<meta-data android:name="com.here.android.maps.apptoken"
android:value="YOUR APP CODE"/>
5. Replace the YOUR APP ID and YOUR APP CODE strings with appropriate credentials for your
Application from developer.here.com when you registered.
29
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
We need to Add HERE Libraries to the project and add it to the build path
Edit activity_main.xml
Along with permissions and credentials, you must add an Android <fragment /> tag to set up the
map fragment that your application activity will be associated with. In this section, we will display a
text label (generated as part of the default new application) and a map right below label as follows:
1. From the Package Explorer, under the res/layout/ folder of your project, double-click the
activity_main.xml file to open it for editing.
2. At the bottom of the editor view that displays the layout for MainActivity, click the
activity_main.xml tab to switch the file's view to text editor mode.
30
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
We need to Add HERE Libraries to the project and add it to the build path
Ensure that the XML file has <LinearLayout></LinearLayout> as its root element.
Depending on your version of Eclipse, this may be a RelativeLayout instead. If that is the
case, replace the contents of the file with the following:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</LinearLayout>
31
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
We need to Add HERE Libraries to the project and add it to the build path
Add the following markup beneath the <TextView/> tag:
<!-- Map Fragment embedded with the map object -->
<fragment
class="com.here.android.mpa.mapping.MapFragment"
android:id="@+id/mapfragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Result: When MapFragment is initialized, your
application's MainActivity will contain a
MapFragment UI element (with the ID mapfragment)
that owns a Map object.
32
Creating a Simple Application
© 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
From the Package Explorer, under the src/ folder of your project, double-click the
MainActivity.java file to open it for editing.
• Revise the import statements and functional logic of the MainActivity to look like the following:
package com.mapstutorial.helloheremaps;
33
import android.app.Activity;
import android.os.Bundle;
import com.here.android.mpa.common.GeoCoordinate;
import com.here.android.mpa.common.OnEngineInitListener;
import com.here.android.mpa.mapping.Map;
import com.here.android.mpa.mapping.MapFragment;
public class MainActivity extends Activity {
// map embedded in the map fragment
private Map map = null;
// map fragment embedded in this activity
private MapFragment mapFragment = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Search for the map fragment to finish setup by calling init().
mapFragment = (MapFragment)getFragmentManager().findFragmentById(
R.id.mapfragment);
mapFragment.init(new OnEngineInitListener() {
@Override
public void onEngineInitializationCompleted(
OnEngineInitListener.Error error)
{
if (error == OnEngineInitListener.Error.NONE) {
// retrieve a reference of the map from the map fragment
map = mapFragment.getMap();
// Set the map center to Angeles (no animation)
map.setCenter(new GeoCoordinate(15.1447, 120.5957, 0.0),
Map.Animation.NONE);
// Set the zoom level to the average between min and max
map.setZoomLevel(
(map.getMaxZoomLevel() + map.getMinZoomLevel()) / 2);
} else {
System.out.println("ERROR: Cannot initialize Map Fragment");
}
}

Mais conteúdo relacionado

Semelhante a How to Install HERE SDK for ANDROID

MADP - Mobile Application Development Platform - CRE8 Brasil MEAP
MADP - Mobile Application Development Platform - CRE8 Brasil MEAPMADP - Mobile Application Development Platform - CRE8 Brasil MEAP
MADP - Mobile Application Development Platform - CRE8 Brasil MEAPVictor Sebastian
 
Disrupting the future of Software: Aviarc’s story so far - with Shane Mercer
Disrupting the future of Software: Aviarc’s story so far - with Shane MercerDisrupting the future of Software: Aviarc’s story so far - with Shane Mercer
Disrupting the future of Software: Aviarc’s story so far - with Shane Mercernzsoftware
 
Mapping Desktop Applications to Mobile
Mapping Desktop Applications to MobileMapping Desktop Applications to Mobile
Mapping Desktop Applications to MobileReddo Mobility
 
CloudApper Honeywell Datasheet.pdf
CloudApper Honeywell Datasheet.pdfCloudApper Honeywell Datasheet.pdf
CloudApper Honeywell Datasheet.pdfMohammad Shahnewaz
 
Knowledge Partner Professionals Services Overview
Knowledge Partner Professionals Services OverviewKnowledge Partner Professionals Services Overview
Knowledge Partner Professionals Services OverviewAshutosh Raina
 
Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1sapientindia
 
Event Management System
Event Management SystemEvent Management System
Event Management SystemQamber Ali
 
App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1ShepHertz
 
BTP+Onboarding+Webinar+-+SAP+Build+Apps+January+2024.pdf
BTP+Onboarding+Webinar+-+SAP+Build+Apps+January+2024.pdfBTP+Onboarding+Webinar+-+SAP+Build+Apps+January+2024.pdf
BTP+Onboarding+Webinar+-+SAP+Build+Apps+January+2024.pdfsamimbangalore
 
App forum2015 London - RhoMobile Update
App forum2015 London - RhoMobile UpdateApp forum2015 London - RhoMobile Update
App forum2015 London - RhoMobile Updaterobgalvinjr
 
IMGS Geospatial User Group 2014 - GeoMedia WebMap 2014
IMGS Geospatial User Group 2014 - GeoMedia WebMap 2014IMGS Geospatial User Group 2014 - GeoMedia WebMap 2014
IMGS Geospatial User Group 2014 - GeoMedia WebMap 2014IMGS
 
Real estate
Real estateReal estate
Real estatekarang88
 
Introduction to Reddo Webinar
Introduction to Reddo WebinarIntroduction to Reddo Webinar
Introduction to Reddo WebinarReddo Mobility
 
WE_ARE Interactive - Overview of our services
WE_ARE Interactive - Overview of our servicesWE_ARE Interactive - Overview of our services
WE_ARE Interactive - Overview of our servicesStudio Interactif WE_ARE
 
Optimize Experiences Everywhere: How Marketers Leverage Real-Time App Agility...
Optimize Experiences Everywhere: How Marketers Leverage Real-Time App Agility...Optimize Experiences Everywhere: How Marketers Leverage Real-Time App Agility...
Optimize Experiences Everywhere: How Marketers Leverage Real-Time App Agility...Ensighten
 

Semelhante a How to Install HERE SDK for ANDROID (20)

MADP - Mobile Application Development Platform - CRE8 Brasil MEAP
MADP - Mobile Application Development Platform - CRE8 Brasil MEAPMADP - Mobile Application Development Platform - CRE8 Brasil MEAP
MADP - Mobile Application Development Platform - CRE8 Brasil MEAP
 
Disrupting the future of Software: Aviarc’s story so far - with Shane Mercer
Disrupting the future of Software: Aviarc’s story so far - with Shane MercerDisrupting the future of Software: Aviarc’s story so far - with Shane Mercer
Disrupting the future of Software: Aviarc’s story so far - with Shane Mercer
 
Mapping Desktop Applications to Mobile
Mapping Desktop Applications to MobileMapping Desktop Applications to Mobile
Mapping Desktop Applications to Mobile
 
JAKT Portfolio
JAKT PortfolioJAKT Portfolio
JAKT Portfolio
 
CloudApper Honeywell Datasheet.pdf
CloudApper Honeywell Datasheet.pdfCloudApper Honeywell Datasheet.pdf
CloudApper Honeywell Datasheet.pdf
 
Knowledge Partner Professionals Services Overview
Knowledge Partner Professionals Services OverviewKnowledge Partner Professionals Services Overview
Knowledge Partner Professionals Services Overview
 
Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1
 
Event Management System
Event Management SystemEvent Management System
Event Management System
 
App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1
 
BTP+Onboarding+Webinar+-+SAP+Build+Apps+January+2024.pdf
BTP+Onboarding+Webinar+-+SAP+Build+Apps+January+2024.pdfBTP+Onboarding+Webinar+-+SAP+Build+Apps+January+2024.pdf
BTP+Onboarding+Webinar+-+SAP+Build+Apps+January+2024.pdf
 
HERE Maps for the Nokia X platform
HERE Maps for the Nokia X platformHERE Maps for the Nokia X platform
HERE Maps for the Nokia X platform
 
App forum2015 London - RhoMobile Update
App forum2015 London - RhoMobile UpdateApp forum2015 London - RhoMobile Update
App forum2015 London - RhoMobile Update
 
IMGS Geospatial User Group 2014 - GeoMedia WebMap 2014
IMGS Geospatial User Group 2014 - GeoMedia WebMap 2014IMGS Geospatial User Group 2014 - GeoMedia WebMap 2014
IMGS Geospatial User Group 2014 - GeoMedia WebMap 2014
 
Real estate
Real estateReal estate
Real estate
 
Introduction to Reddo Webinar
Introduction to Reddo WebinarIntroduction to Reddo Webinar
Introduction to Reddo Webinar
 
Neev mobile offerings
Neev mobile offeringsNeev mobile offerings
Neev mobile offerings
 
LUMIA APP LAB #16: HERE APPLICATION LAUNCHERS
LUMIA APP LAB #16: HERE APPLICATION LAUNCHERSLUMIA APP LAB #16: HERE APPLICATION LAUNCHERS
LUMIA APP LAB #16: HERE APPLICATION LAUNCHERS
 
WE_ARE Interactive - Overview of our services
WE_ARE Interactive - Overview of our servicesWE_ARE Interactive - Overview of our services
WE_ARE Interactive - Overview of our services
 
Optimize Experiences Everywhere: How Marketers Leverage Real-Time App Agility...
Optimize Experiences Everywhere: How Marketers Leverage Real-Time App Agility...Optimize Experiences Everywhere: How Marketers Leverage Real-Time App Agility...
Optimize Experiences Everywhere: How Marketers Leverage Real-Time App Agility...
 
Enterprise Mobility @ Neev
Enterprise Mobility @ NeevEnterprise Mobility @ Neev
Enterprise Mobility @ Neev
 

Mais de SMART DevNet

INTERNET.ORG CHALLENGE for AngelHack Manila Hackers
INTERNET.ORG CHALLENGE for AngelHack Manila HackersINTERNET.ORG CHALLENGE for AngelHack Manila Hackers
INTERNET.ORG CHALLENGE for AngelHack Manila HackersSMART DevNet
 
#AngelHackMNL 2014 Bit pay challenge
#AngelHackMNL 2014 Bit pay challenge#AngelHackMNL 2014 Bit pay challenge
#AngelHackMNL 2014 Bit pay challengeSMART DevNet
 
AngelHack Manila 2014 Welcome Slides
AngelHack Manila 2014 Welcome SlidesAngelHack Manila 2014 Welcome Slides
AngelHack Manila 2014 Welcome SlidesSMART DevNet
 
Hackers Guidelines for AngelHack Manil 2014
Hackers Guidelines for AngelHack Manil 2014Hackers Guidelines for AngelHack Manil 2014
Hackers Guidelines for AngelHack Manil 2014SMART DevNet
 
Readysaster Hack - Opening Remarks
Readysaster Hack - Opening RemarksReadysaster Hack - Opening Remarks
Readysaster Hack - Opening RemarksSMART DevNet
 
SMART Devnet Lightning talk @ DevCon Summit 2013
SMART Devnet Lightning talk @ DevCon Summit 2013SMART Devnet Lightning talk @ DevCon Summit 2013
SMART Devnet Lightning talk @ DevCon Summit 2013SMART DevNet
 
AppHack Davao Welcome Slides
AppHack Davao Welcome SlidesAppHack Davao Welcome Slides
AppHack Davao Welcome SlidesSMART DevNet
 
Welcome remarks to SYNC:Music+Tech
Welcome remarks to SYNC:Music+TechWelcome remarks to SYNC:Music+Tech
Welcome remarks to SYNC:Music+TechSMART DevNet
 
AngelHack Manila 2013 Event Flow
AngelHack Manila 2013 Event FlowAngelHack Manila 2013 Event Flow
AngelHack Manila 2013 Event FlowSMART DevNet
 
Anson's Building Houserules
Anson's Building Houserules Anson's Building Houserules
Anson's Building Houserules SMART DevNet
 
AngelHack Manila Pre-Event Slides
AngelHack Manila Pre-Event SlidesAngelHack Manila Pre-Event Slides
AngelHack Manila Pre-Event SlidesSMART DevNet
 
SMART DevNet: The Elevator Pitch (Cebu Edition)
SMART DevNet: The Elevator Pitch (Cebu Edition)SMART DevNet: The Elevator Pitch (Cebu Edition)
SMART DevNet: The Elevator Pitch (Cebu Edition)SMART DevNet
 
Webgeek Keynote: Mobile Developers Rock!
Webgeek Keynote: Mobile Developers Rock!Webgeek Keynote: Mobile Developers Rock!
Webgeek Keynote: Mobile Developers Rock!SMART DevNet
 
Cross Platform HTML5 Mobile Development and the Firefox OS
Cross Platform HTML5 Mobile Development and the Firefox OSCross Platform HTML5 Mobile Development and the Firefox OS
Cross Platform HTML5 Mobile Development and the Firefox OSSMART DevNet
 
YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5SMART DevNet
 
SMART DevNet: The Elevator Pitch
SMART DevNet: The Elevator PitchSMART DevNet: The Elevator Pitch
SMART DevNet: The Elevator PitchSMART DevNet
 
IdeaSpace-DLSU Presentation
IdeaSpace-DLSU PresentationIdeaSpace-DLSU Presentation
IdeaSpace-DLSU PresentationSMART DevNet
 
Smart DevNet presents: The Mobile Apps Ecosystem
Smart DevNet presents: The Mobile Apps EcosystemSmart DevNet presents: The Mobile Apps Ecosystem
Smart DevNet presents: The Mobile Apps EcosystemSMART DevNet
 

Mais de SMART DevNet (19)

INTERNET.ORG CHALLENGE for AngelHack Manila Hackers
INTERNET.ORG CHALLENGE for AngelHack Manila HackersINTERNET.ORG CHALLENGE for AngelHack Manila Hackers
INTERNET.ORG CHALLENGE for AngelHack Manila Hackers
 
#AngelHackMNL 2014 Bit pay challenge
#AngelHackMNL 2014 Bit pay challenge#AngelHackMNL 2014 Bit pay challenge
#AngelHackMNL 2014 Bit pay challenge
 
AngelHack Manila 2014 Welcome Slides
AngelHack Manila 2014 Welcome SlidesAngelHack Manila 2014 Welcome Slides
AngelHack Manila 2014 Welcome Slides
 
Hackers Guidelines for AngelHack Manil 2014
Hackers Guidelines for AngelHack Manil 2014Hackers Guidelines for AngelHack Manil 2014
Hackers Guidelines for AngelHack Manil 2014
 
Readysaster Hack - Opening Remarks
Readysaster Hack - Opening RemarksReadysaster Hack - Opening Remarks
Readysaster Hack - Opening Remarks
 
20 phnet beyond
20 phnet beyond20 phnet beyond
20 phnet beyond
 
SMART Devnet Lightning talk @ DevCon Summit 2013
SMART Devnet Lightning talk @ DevCon Summit 2013SMART Devnet Lightning talk @ DevCon Summit 2013
SMART Devnet Lightning talk @ DevCon Summit 2013
 
AppHack Davao Welcome Slides
AppHack Davao Welcome SlidesAppHack Davao Welcome Slides
AppHack Davao Welcome Slides
 
Welcome remarks to SYNC:Music+Tech
Welcome remarks to SYNC:Music+TechWelcome remarks to SYNC:Music+Tech
Welcome remarks to SYNC:Music+Tech
 
AngelHack Manila 2013 Event Flow
AngelHack Manila 2013 Event FlowAngelHack Manila 2013 Event Flow
AngelHack Manila 2013 Event Flow
 
Anson's Building Houserules
Anson's Building Houserules Anson's Building Houserules
Anson's Building Houserules
 
AngelHack Manila Pre-Event Slides
AngelHack Manila Pre-Event SlidesAngelHack Manila Pre-Event Slides
AngelHack Manila Pre-Event Slides
 
SMART DevNet: The Elevator Pitch (Cebu Edition)
SMART DevNet: The Elevator Pitch (Cebu Edition)SMART DevNet: The Elevator Pitch (Cebu Edition)
SMART DevNet: The Elevator Pitch (Cebu Edition)
 
Webgeek Keynote: Mobile Developers Rock!
Webgeek Keynote: Mobile Developers Rock!Webgeek Keynote: Mobile Developers Rock!
Webgeek Keynote: Mobile Developers Rock!
 
Cross Platform HTML5 Mobile Development and the Firefox OS
Cross Platform HTML5 Mobile Development and the Firefox OSCross Platform HTML5 Mobile Development and the Firefox OS
Cross Platform HTML5 Mobile Development and the Firefox OS
 
YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5
 
SMART DevNet: The Elevator Pitch
SMART DevNet: The Elevator PitchSMART DevNet: The Elevator Pitch
SMART DevNet: The Elevator Pitch
 
IdeaSpace-DLSU Presentation
IdeaSpace-DLSU PresentationIdeaSpace-DLSU Presentation
IdeaSpace-DLSU Presentation
 
Smart DevNet presents: The Mobile Apps Ecosystem
Smart DevNet presents: The Mobile Apps EcosystemSmart DevNet presents: The Mobile Apps Ecosystem
Smart DevNet presents: The Mobile Apps Ecosystem
 

Último

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Último (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

How to Install HERE SDK for ANDROID

  • 1. Lonel Labit Manager Regional Map & Content, APAC lonel.labit@here.com HERE, A Nokia Company HERE SOFTWARE DEVELOPMENT KIT FOR ANDROID
  • 2. What is the HERE SDK for Android? © 2014 HERE | HERE BRIEFING | COMPANY CONFIDENTIAL
  • 3. The HERE SDK for Android provides a set of programming interfaces that enable developers to build immersive, geographically aware Android applications by leveraging a powerful and flexible mapping platform.
  • 4. What are the Features of the HERE SDK for Android? © 2014 HERE |
  • 5. 55 Map Display • Client-site map rendering using vector data • Dynamic map download • 214 countries in • 54 languages • Maps preload for offline usage • Map styles: normal, night, transit etc. • Map display of >15,000 textured 3D landmarks • Touch screen gestures: pan, flick, pinch zoom, rotate, tilt etc. • Map overlay of objects such as polylines, polygons, icons, routes. • Map overlay of custom raster tiles (e.g. for heat maps) © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 6. 66 Venue Maps • Feature rich maps of shopping malls, train stations and airports • Shading and labeling of detailed spaces (e.g stores, restaurants) • Indication of facilities including restrooms, ATMs, escalators, elevators, etc. • Selectable user interface • Tap-on capability for retrieval of venue information • Switcher floor capability for venues and display of current floor • Searchable directory of stores and facilities • 18,000 venues in 41 countries © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 7. 77 3D Maps and Street Level Imagery 3D Maps • 3D map display in 3D • 3D landmarks display Street Level Imagery • Panoramic (360-degree) street level imagery for >90 cities • Imagery as Internet map enhancement service • Support for search and visualization use cases • High-resolution view of key features, tourist attractions, historical locations and commercial centers © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 8. 88 Traffic Real-time traffic display on the map • Traffic flow for >30 countries • Color coded traffic flow: Green - Normal Amber - High Red - Very High Black - Stalling • Traffic incidents for >20 countries © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 9. 99 Touch screen gestures HERE SDKs are optimized for touch devices and interfaces supporting a variety of touch gestures: • Panning or free drag • Swipe or kinetic flick • Pinch / spread to zoom • Single tap • Double tap • Two-finger tap • Two-finger vertical drag • Two-finger rotate © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 10. 1010 Directions • Get driving directions for >90 countries • Driving directions taking real-time traffic conditions into account • Pedestrian directions using walkways (e.g. stairs, ramps) • Public Transit directions using timetables for >400 cities • Routing options • type (fastest/shortest) • avoid options (toll roads, motorways, parks etc.) • Offline route calculation © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 11. 1111 Places and Search Places • > 75 million places available • Explore places by categories • Explore places details (images, ratings, reviews, editorials etc.) Search • Geocoding • Reverse Geocoding Offline mode for Places search, Geocoding, Reverse Geocoding © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 12. 12 Hybrid Engine Functionality • HERE maps rendering independent of data connection • Map data preload for all countries/regions. Map data is highly compressed vector data => keeping size requirements to a minimum • E.g. California ~200MB, complete world ~14GB • HERE Cloud on-demand map data download where map data wasn’t already preloaded • HERE Cloud on-demand download of non-vector maps such as Satellite and Terrain, Street Level Imagery and custom map stiles - requires data connection • Route calculation, search for places, geocoding and reverse geocoding capabilities available with no data connection © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 13. 13 Live Sight • Track position of device in space and animate view accordingly • Seamless transitions from Map to LiveSight and back again • Gesture support allows the user to interact with content, custom gestures can also be defined • Content transitions and interaction are animated using hardware acceleration • "Radar" UI support, which provides the user with more context regarding their position relative to content • Highly configurable LiveSight engine allows the user experience to be customized © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 14. 14 Favourites – Make Your Personal Map on the Go Collect the places you’d like to visit again as favourites so they are always at your fingertips and finding them is a snap - in any HERE app.
  • 15. 15 How to get started? Go to www.developer.here.com Click Sign in/Register © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 16. 16 How to get started? Create an APP Select: © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 17. 17 How to get started? Keep your APP_ID and Code! © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential
  • 18. 18 Download the SDK at this link: © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential http://1drv.ms/Vn9CGG
  • 19. 19 Serious Coding Stuff…. Coming Ahead…. >_< HERE Philippines Mapping Operations at San Pablo Laguna.
  • 20. 20 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential 4 Easy Steps to do this:
  • 21. 21 Creating a Simple Application First things first – Setup your emulator © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential Note: Please set a 200-300 MiB SD Card Space and check User Host GPU
  • 22. 22 Creating a Simple Application First things first – Install Mapsservice-release.apk in your android device/emulator The apk is in the apk folder. © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential Note: The HERE SDK supports Android 2.3.3 or higher. However, for application targeting as low as Android SDK version 2.3.3 to 2.3.7, MapFragment is supported through the use of com.here.android.mpa.mapping.MapComp atibilityFragment and the Android Support Package ( http://developer.android.com/tools/extras/support -library.html ). For more details, refer to http://developer.android.com/tools/extras/support -library.html#Using
  • 23. 23 Creating a Simple Application What do we want to achieve in this topic? © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential • Pan around the map to view different geographical regions • Center the map on a specific part of the viewable area using standard Android single-tap gestures • Zoom in and out using standard Android pinch-to-zoom, double- tap, or two-finger tap • Rotate the map using standard Android two-finger rotate gestures • Tilt the map using standard Android two-finger tilt gestures
  • 24. 24 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential 1. From the Eclipse menu, select New > Android Application Project to open the New Android App dialog (or click from the toolbar) 2. In the New Android Application dialogue, under Application Name, specify an appropriate application name (The remainder of this tutorial will refer the application name as HelloHEREMaps) 3. Under Project Name, specify an appropriate project name 4. Under Package Name, specify an appropriate package name (For example, com.mapstutorial.helloheremaps. This is the package name that this tutorial will use) 5. Under Minimum Required SDK, select the lowest version of the Android SDK you wish to support. For this sample application, we will use Android 3.0
  • 25. 25 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential 6. Under Target SDK, select your target Android SDK version with API level 14 (Ice Cream Sandwich 4.0.1) or above 7. Click Next 8. Click Next to use the default icons 9. On the Create Activity dialog box, select Blank Activity and click Next 10. Click Finish Result: A new project will appear within the Eclipse Package Explorer, which will expand to show the location of the activity_main.xml file. The file itself will be opened in the main editor view, in Graphical Layout mode for adding and editing UI elements.
  • 26. 26 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential We need to Add HERE Libraries to the project and add it to the build path After creating the skeleton of your new application, add the HERE SDK resources as follows: 1. From the directory where you installed the HERE SDK, copy the contents of the HERE-sdk/libs/ folder to your project's libs/ folder. 2. In your Eclipse project's libs/ folder, right-click the HERE-sdk.jar file and select Build Path > Add to Build Path.
  • 27. 27 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential We need to Add HERE Libraries to the project and add it to the build path Edit AndroidManifest.xml With resources added to your project, the next stage of creating an application with the HERE SDK is to edit the project's AndroidManifest.xml file to specify Android permissions as follows: 1. From the Package Explorer, double-click your project's AndroidManifest.xml file to open it for editing. 2. At the bottom of the editor view that displays the manifest, click the AndroidManifest.xml tab to switch the file's view to text editor mode. 3. Add the following markup beneath the <uses-sdk/> tag: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  • 28. 28 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential We need to Add HERE Libraries to the project and add it to the build path 4. Within the <application></application> block of tags, add the following markup directly beneath the <activity></activity> tag: <meta-data android:name="com.here.android.maps.appid" android:value="YOUR APP ID"/> <meta-data android:name="com.here.android.maps.apptoken" android:value="YOUR APP CODE"/> 5. Replace the YOUR APP ID and YOUR APP CODE strings with appropriate credentials for your Application from developer.here.com when you registered.
  • 29. 29 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential We need to Add HERE Libraries to the project and add it to the build path Edit activity_main.xml Along with permissions and credentials, you must add an Android <fragment /> tag to set up the map fragment that your application activity will be associated with. In this section, we will display a text label (generated as part of the default new application) and a map right below label as follows: 1. From the Package Explorer, under the res/layout/ folder of your project, double-click the activity_main.xml file to open it for editing. 2. At the bottom of the editor view that displays the layout for MainActivity, click the activity_main.xml tab to switch the file's view to text editor mode.
  • 30. 30 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential We need to Add HERE Libraries to the project and add it to the build path Ensure that the XML file has <LinearLayout></LinearLayout> as its root element. Depending on your version of Eclipse, this may be a RelativeLayout instead. If that is the case, replace the contents of the file with the following: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" tools:context=".MainActivity" /> </LinearLayout>
  • 31. 31 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential We need to Add HERE Libraries to the project and add it to the build path Add the following markup beneath the <TextView/> tag: <!-- Map Fragment embedded with the map object --> <fragment class="com.here.android.mpa.mapping.MapFragment" android:id="@+id/mapfragment" android:layout_width="match_parent" android:layout_height="match_parent"/> Result: When MapFragment is initialized, your application's MainActivity will contain a MapFragment UI element (with the ID mapfragment) that owns a Map object.
  • 32. 32 Creating a Simple Application © 2014 HERE | HERE Platform for Business – HERE SDKs for Business | [NAME] | Company confidential From the Package Explorer, under the src/ folder of your project, double-click the MainActivity.java file to open it for editing. • Revise the import statements and functional logic of the MainActivity to look like the following: package com.mapstutorial.helloheremaps;
  • 33. 33 import android.app.Activity; import android.os.Bundle; import com.here.android.mpa.common.GeoCoordinate; import com.here.android.mpa.common.OnEngineInitListener; import com.here.android.mpa.mapping.Map; import com.here.android.mpa.mapping.MapFragment; public class MainActivity extends Activity { // map embedded in the map fragment private Map map = null; // map fragment embedded in this activity private MapFragment mapFragment = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Search for the map fragment to finish setup by calling init(). mapFragment = (MapFragment)getFragmentManager().findFragmentById( R.id.mapfragment); mapFragment.init(new OnEngineInitListener() { @Override public void onEngineInitializationCompleted( OnEngineInitListener.Error error) { if (error == OnEngineInitListener.Error.NONE) { // retrieve a reference of the map from the map fragment map = mapFragment.getMap(); // Set the map center to Angeles (no animation) map.setCenter(new GeoCoordinate(15.1447, 120.5957, 0.0), Map.Animation.NONE); // Set the zoom level to the average between min and max map.setZoomLevel( (map.getMaxZoomLevel() + map.getMinZoomLevel()) / 2); } else { System.out.println("ERROR: Cannot initialize Map Fragment"); } }