[Windows Mobile]測試 Widget 的另一種選擇 - Windows Mobile Widget Emulator

  • 7629
  • 0
  • 2013-04-15

[Windows Mobile]測試 Widget 的另一種選擇 - Windows Mobile Widget Emulator

 

1. 問題描述

除了使用 Windows Mobile 6.5 去測試 Widget 外,是否有其他模擬環境可以做測試。

 

2. 方法

在 CodePlex 中,發佈了 Windows Mobile Widget Emulator (發佈人為 Vimpyboy),可以用來作為 Widget 的模擬環境,首先當然要先下載它

image

 

下載後,解壓縮後,檔案如下所示

image

 

而在本文要測試的 Widget 是之前的文章 [Windows Mobile]修練筆記(9) - 在智慧型裝置專案、Windows Form 應用程式與 Widget 使用 Bing API 達成 Bing 圖片搜尋 裡面的 Widget ,功能為輸入關鍵字,按下 Search 按鈕後,顯示 Bing 圖片搜尋結果。

 

我們如何使用 Windows Mobile Widget Emulator,使用方法為以下三步驟

(1) 把要測試的 widget ,放到同一個資料夾中,並把此資料夾複製到 widgets 資料夾底下

image

 

(2) 修改 index.htm 的 iframe,改為要測試的 widget 的 html file

image

 

(3) 在您的 widget 的 html file 增加以下 code 


<script src="../../assets/Widget.js" type="text/javascript"></script>

 

image

image

 

接著就可以做測試了,測試方式就是使用 Internet Explorer 開啟 Windows Mobile Widget Emulator 的 index.htm

以下為測試影片,在模擬的過程中,可以在左邊選擇不同的 Windows Mobile 尺寸大小

 

 

3. 結語

假如有了 Windows Mobile Widget Emulator,就可以不用安裝 Windows Mobile 6.5 模擬器,對我這台古董筆電 IBM R51 應該是個好消息,不然有時開模擬器就要花三分鐘,不過假如要 release 出去前,建議還是將 widget 拿到Windows Mobile 6.5 模擬器跑跑看。