【正文】
e:負責(zé)執(zhí)行那些不需要去和用戶交互而且還要求在系統(tǒng)中長期運行的任務(wù)。 5. 軟件可提供手動更新功能以及后臺自動更新天氣信息的功能。此時便有以下幾點要求,第一、需要有便捷的查詢功能,最簡潔的提供資訊,直觀的收到我所需要了解的天氣信息即可。而且它還是開源的,這使得 MyEclipse和 Aptana 這些基于 Eclipse 制作出來的優(yōu)秀 IDE 得以成功問世。 Java 語言是一種較為特殊的高級語言,因為 Java 程序要經(jīng)歷先編譯、后解釋兩個步驟。進行專門的優(yōu)化處理。 它能夠支持 Windows/Linux/Unix 等主流的 操作系統(tǒng) 的 同時 也 能夠跟很多程序語言相結(jié)合 。第三點是并行運行模式。因此選擇了基于 Android 平臺氣象軟件的設(shè)計與實現(xiàn)?,F(xiàn)在只需輕輕一點,便可通過小小的手機終端享受到高效且方便的網(wǎng)絡(luò)服務(wù)。所以系統(tǒng)用戶激活數(shù)一直很高。 I 基于 Android平臺氣象軟件的設(shè)計與實現(xiàn) 摘 要 在當今這個高速發(fā)展的信息時代 ,傳統(tǒng)互聯(lián)網(wǎng)已經(jīng)日趨成熟,而移動互聯(lián)網(wǎng)卻處于井噴式的爆發(fā)階段。因為蘋果和谷歌科技巨頭 具有強大的技術(shù)實力背景,人性化的交互設(shè)計,高水平的設(shè)計規(guī)范,完善的服務(wù)終端。s mainstream two smartphone system platform are dominated by Android and iOS. Them with its high intelligent, interactive strong, strong expansibility, high innovation degree of every will dominate the smartphone market more than ten years of symbian kicked out history stage, also contributed to the rapid development of mobile Inter. Because Apple and Google Company technology giant has strong technical strength background, humanized interaction design, high level of design specifications, the consummation service terminal. So the users of the system has been very high activation number. And with the assistance of the Android open source and open features make it has good expansibility. He is popular with the major mobile phone makers, so the Android occupying most of the market. And it has a convenient development and debugging tools, an open architecture, mature multimedia and major ponents, lower development costs. This is deeply attract developers. Design is based on the Android platform, this paper use the relevant development tools, to design and implementation of meteorological software application. Key words: API; Android; SQLite Database; Weather software; Java 1 1 緒 論 研究背景與意義 在現(xiàn)今信息化、智能化的時代,移動互聯(lián)網(wǎng)的地位日趨重要, 3G、 4G 通信技術(shù)高速發(fā)展,不管是國內(nèi)的 TD 制式還是歐美的 FDD 制式, 3G、 4G 通信技術(shù)在移動互聯(lián)網(wǎng)的發(fā)展歷程中具有重要的意義,是一塊不可替代的基石。而氣象軟件是相對比較新穎且實用的一款應(yīng)用軟件。通過將系統(tǒng)深度定制,來達到個性化的極致,以此吸引廣大消費者,搶占市場份額。它 是以嵌入式為設(shè)計目標的 ,而且目前已經(jīng)在很多 嵌入式產(chǎn)品 中使用了它,它 的特點是高度便攜、使用方便、結(jié)構(gòu)緊湊、高效、可 靠。不同于 Java 虛擬機, Dalvik 是為移動設(shè)備專門量 身定制的,它可以在手機內(nèi)存、 CPU 性能有限等情況下。與它類似的程序設(shè)計語言有 C、python 和 Ruby,它們在某些領(lǐng)域都有自己的特點和優(yōu)勢,所以彼此都是處于競爭者的狀態(tài)。 Eclipse+ADT 概述 是 Java開發(fā)中最好用、最流行的 IDE工具之一。 系統(tǒng)需求 基于 Android 平臺的氣象軟 件,主要強調(diào)的就是便捷性,一般人們在準備出門的時候會提前看一下天氣預(yù)報,根據(jù)氣溫提示考慮如何著裝以及是否帶傘等問題。 4. 軟件可自由切換全國各大城市以及查看它的天氣信息。本程序是默認的 Standard 啟動模式。而 model 包主要用于存放所有數(shù)據(jù)模型相關(guān)的代碼,例如省模塊的 Province 類、市模塊的 County 類、縣模 塊 City 類。 表 33 縣級信息表 列名 數(shù)據(jù)類型 可否為空 屬性名稱 說明 Id Integer 否 Id 自增長主鍵 County_name Text 否 County_name / County_code text 否 County_code / city_id integer 否 city_id 外鍵 11 4 設(shè)計思想與實現(xiàn) 整個氣象軟件是我自己獨立設(shè)計完成的雖然簡單功能點并不多,技術(shù)要求也不高,但想實現(xiàn)卻需要用到 UI、網(wǎng)絡(luò)、定位、數(shù)據(jù)存儲、服務(wù)等技術(shù),算是比較考驗綜合應(yīng)用能力。在onStartCommand 方法中開啟子線程,然后調(diào)用 updateWeather 方法更新天氣,再將氣象信息存在 SharePreferences 文件中,并且為了使軟件不會因為需要經(jīng)常訪問服務(wù)器而耗費額外的流量,所以我們要設(shè)置一定時間間隔,到特定時間時,就會啟動廣播去通知后臺更新天氣信息,這樣即可完成后臺天氣信息的自動更新了。 impo