Skip to Content
Android Developer Tools深入精要
book

Android Developer Tools深入精要

by Mike Wolfson
July 2014
Intermediate to advanced
248 pages
5h 19m
Chinese
GoTop Information, Inc.
Content preview from Android Developer Tools深入精要
模擬位置與路徑
|
111
第八章:模擬事件
第八章
模擬事件
[Page-115]
有許多你想測試的事件在現實生活中是難以複製的。在這些情況下,有一些工具可以
模擬這些事件,而讓測試更有效率。
模擬位置與路徑
例如,測試位置功能可能是個挑戰;前往一個偏遠地區或是一遍又一遍地模擬相同的
路徑是不切實際或是不可能的。幸運的是
DDMS
工具提供方式可以指定一個模擬器想
要的位置(以緯度/經度座標),或是想要模擬的路徑(以
GPX
KML
格式)。
為了要模擬位置,你需要開啟
DDMS
工具(參考第
148
頁「開啟
DDMS
視圖」);要
開啟
Eclipse
視圖,點選
Window
Open Perspective...
Other...
DDMS
OK
接著開啟「
Emulator Control
(模擬器控制)」分頁(如圖
8-1
),在這分頁中,你可
以看到一個標示著「
Location Controls
(位置控制)」的區塊,你可以在這輸入位置屬
性。當你輸入完自訂的資料後,點擊「
Send
」、「
Load GPX
」或「
Load KML
」按鈕
(取決於你正在操作的資料類型),這使得模擬器會模擬你指定的位置。
112
|
第八章:模擬事件
[Page-116]
8-1
模擬在模擬器上的位置
底下的步驟展示如何在裝置上模擬特定的位置;同 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Android 高效能多執行緒

Android 高效能多執行緒

Anders Goransson
深入淺出 jQuery

深入淺出 jQuery

Ryan Benedetti, Ronan Cranley
HTML5 錦囊妙計

HTML5 錦囊妙計

Christopher Schmitt, Kyle Simpson

Publisher Resources

ISBN: 9789863470861