Tài liệu Tìm hiểu dịch vụ googlemap xây dựng ứng dụng chia sẻ vị trí với bạn bè trên nền tảng android

  • Số trang: 115 |
  • Loại file: PDF |
  • Lượt xem: 208 |
  • Lượt tải: 0
tailieuonline

Đã đăng 39907 tài liệu

Mô tả:

BQ MAO DUC DAO T30 D3I HQC THANG LONG ---o0o--- ICHOA LUAN TOT NGHIEP TIM HIEU NCH VI) GOOGLE MAP XAY DIJSNG ffNG DIJNG CHIA SE VI TRi VOI BAN BE TREN NEN TANG ANDROID MAO VIEN HUONG DAN : Ths. Le Minh Tula SINN VIEN THVC EltN : Tan Trung MA SINK VIEN : A14986 CHUAN NGANH : Khoa hue may tinh HA NQI - 2014 This is trial version www.adultpdf.com MVC LVC 1 LEI NOI DAU CH1TONG 1. GIO.1 THI$U BAI TORN VAI NET VE GOOGLEMAP 1.1. 1.2. NNONo GI GOOGLEMAP KHONG HO TROT Tim SAO LAI CAN ONG DUNG CHIA SE VI lid? 1.3. MOI THONG HOAT %NG 1.4. 1.4.1. Tai sao lai ding Android? 1.4.2. Google Map API la gi? 1.4.3. Server gamin 11 , hoot dong -3 3 3 3 4 4 4 4 CH1U'ONG 2. GIOI THI$U HE DIEU HANH ANDROID-----..------ ..... ANDROID LA GI? 2.1. LjCH Sll PRAT TRIEN 2.2. 2.2.1. Su ra dei cia Android 2.22. Ctic phien ban Android KEEN TROC HE DIEU HANH ANDROID 2.3. 2.3.1. Linux Kernel 2.3.2. Libraries 2.3.3. Android Runtime 2.3.4. Application Framework 2.3.5. Application fiNG DUNG THEN TIBET BI ANDROID 2.4. 2.4.1. 1VhOng gidi hpn cua thilt bi di Ong 2.4.2. Ngen ng9 lop trinh 2.4.3. Most truing hgp trinh CHUVNG 3. TONG QUAN VE GOOGLE MAP API GICsi THI$U VE GOOGLE MAP API SO' DUNG GOGGLE MAP API 3.2. 3.2.1. cai d4t va arch ery Google Map API 3.3. CAC DOI WONG QUAN THONG WONG GOOGLE MAP API 3.1. tuong ben db - The Map Object 13.1. 3.3.2. Marker 13.3. !Info Windows CHITONG 4. CHHONG TRINH 2FRIEND 5 6 6 7 11 11 12 12 13 14 14 14 14 15 —16 16 16 16 24 24 24 27 ...29 4.1. GI& Tilleu BA1 TOAN 29 4.2. MOT s0 flu cAu COA BA1 ToAN CAc nitre NANG cHINN 30 31 4.3. 4.3.1. Chic ming &mg kyStai !chain 4.3.2. Chtic :tong demo MO 4.13. Chic ming xem ban do This is trial version www.adultpdf.com 32 36 39 p Chic ming xem vi tri mkt mink 4.14. 42 4.15. Char ndng xem vi tri bon bi 46 4.3.6. Chile nang nip nh4t t4 tri 51 4.3. 7. Chtk mIng gui yiu cdu kit bon 4.3.8. Chic mkg xcic nIttrm yiu eau kit bon 53 4.3.9. Chtic ntIng tim ditimg din vi tri bon 61 57 4.3.10. Chile rating xem thong tin bon 63 4.3.11. Char ?tang giao tilp vol bon 66 4.112. Chic neng Miy kit bon. 69 4.3.13. Chic ming Op MO thong tin cli ?them 72 4.3.14. Chile :tang thay dal met khiu 76 4.3.15. Chic mIng (Yang mit 80 MQT SO VAN DE icHAc 4.4. 82 4.4.1. Kin di chi duir• ng - Direction API 82 4.4.2. Kin di dinh vi vi tri thiit bj 85 4.4.3. Kin di idn suit cdp nhtit de lieu 88 THIET KE cO set al LIEU 4.5. 4.11. M6 hinh quan hf 4.5.2. Cac bang ate !Nu 4.6. KET LUAN VA DINH WANG PHAT TRIEN 4.6.1. Kit qua dot &or 4.6.2. Dinh Throng phcit Men CH1UONG 5. PHU LOC - CODE MQT So alit NANG CHINH• 89 89 92 92 92 94 5.1.1. Cher Wing deng kY tii khoint 94 5.11 Chtk ?tang ddng nhdp 95 5.1.3. Chic ming hien tri vi tri bon 96 5.1.4. Chile :tang gut yiu cdu kit km 97 5.1.5. Char ming xac nhtin yiu cdu kelt bon 98 5.1.6. Chtec Mug dinh vi vj tri 100 11.7. Char tiling tim dventg din vi tri 101 5.1.8. Chile ?tang cdp Mule thong tin ca thin 105 5.1.9. Char nang thay doi mot khtiu 108 TAI LIEU THAM !CHAO This is trial version www.adultpdf.com 110 DANII MVC HITNH ANH Hinh 2-1: Cac thanh phen cila he dieu himh Android 11 Hinh 2-2: M8 hinh hqp tac gifts may io Dalvik vi Native code 11 Hirsh 3-1: Android SDK Manager 16 Hinh 3-2: Cai det Google API 17 HInh 3-3: Cai Google API (tiep) 18 Hinh 3-4: Import thu vien 18 Hinh 3-5: Import thu vien (tiep) 19 HIM 3-6: Bet Google Maps Android API v2 20 Hinh 3-7: To API Key 20 Hin ► 3-8: Tao API Key 2 21 HIM 3-9: Tao API Key 3 21 Hinh 3-10: Tao project m6i 22 HInh 3-11: Them thu vien vio du an 23 H1nh 3-12: Infowindow thy Bien 28 HInh 4-1: Min hlnh kheri dOng 29 Hinh 4-2: Deng k, tai Ichoen med 35 Ifinh 4-3: Man hinh ding nhep 38 Hinh 4-4: Hien th1 ban de 41 HInh 4-5: Dinh v1 va hien th1 vi tri ngtrbi dung 45 Hinh 4-6: Xem vita ban be 50 Binh 4-7: Giri yeu eau ket ban 56 Minh 4-8: 'Chong the girl them yeu cku 56 Hinh 4-9: Xic nhen yeu ket ban 60 Hinh 4-10: Tim &Ong di den vj tri ban 62 Hinh 4-11: Xem thong tin ban 65 Binh 4-12: Giao tiep ved ban 68 Hinh 4-13: Hity kit ban (x6a ban) 71 This is trial version www.adultpdf.com Hinh 4-14: Cep fillet thong tin ca Mien 75 Hinh 4-15: Thay doi mat khan 79 Hinh 4-16: Dinh vi bang sling di dOng 86 DANH MVC BANG BLEU Bang 4-1: Cac each dinh vi vi tri 85 Bang 4-2: Bang Users 89 Bang 4-3: Bang Location 90 Bang 4-4: Bang Friendl 90 Bang 4-5: Bang Friend2 91 DANH MVC SO Del So de 4-1: So a Use - case 31 Sa do 4-2: Ding ky tai lchoan 32 So di). 4-3: Trish tkr Ding ky tai khan 33 So do 4-4: Ding Step 36 So do 4-5: Xem ban do 39 So d6 4-6: Xem vi tri cita minh 42 So do 4-7: Trish tv Xem vi tri cita minh 43 So d6 4-8: Xem vi tri bon be 47 So do 4-9: Trish tir Xem vi tri bon be 48 Scr do 4-10: Giri yeu citu ket bon 54 So de 4-11: Xac nhe ► yeu cam ket bon 58 So do 4-12: Giao flip veri bon 66 So de 4-13: Huy ket ban 69 Scr de 4-14: Thay doi thong tin ca nhhn 73 So de 4-15: Thay den met khau 77 So de 4-16: Ring xuat 80 So do 4-17: Ma hinh der lieu quan he 89 This is trial version www.adultpdf.com Lin NOIMu Sau met thai gian hoc tap va tim hieu clued sq turemg dart cua cac thay ca, em dA hoan thanh khOa Juan tot nghiep cua minh. Em xin than thanh gui led cam an den cac thay c8 giao b0 mon Tin hoc tru?mg Doi hoc ThAng Long dA huOng din va giOp der em trong qua With em hoc 6 twang. Em xin dac biet girl leri cam an den thay Le Minh Than dd htremg din em thuc hien Mt& luon bet nghiep. Sau khi holm thanh luan vim dm mink, em cam thay minh dA to tin han vai kien thi cda minh, tuy nhien em cam thay minh vin can rat nhieu thieu s6t can phai hoc tap de bel sung kien thiic. MOt lean nera em xin chin thanh cam an cac thiy co QA giup der em trong suet qua trinh em hoc tap 6 trutmg Doi hoc ThAng Long. Trong cuOc sting hien doi ngay nay, tong nghe phat trien math me gin') con ngtrei clang thuc hien duqc Miring c8ng viec ma truerc day twang nhu rat kh6 Ichtin. Sr phat trien cua phuong tien giao thong gitip chang ta di co the bay cao has, di xa has va nhanh ham. Tut' ninon kid slat chin den met quec gia khac, met thanh phO Idkic hay don gian chi la met con phO lin du bon slat chin den, neu 'thong c6 ban da thi a viec tim dubng se kha kh6 Ichtin. Thubng thi bon se phE vita di vira heti dubng, hoac tim met cira hang gin shat c6 ban ban do. Viec de cling Icha the vi, n6 se cho ban cam giac Icham pha met mien diet mai, tuy nhien n6 cling ton Idd nhieu thbi gian quY bau dm bon, nhat la neu ban la doanh titan dang c6 c8ng viec quan tong. D6 chinh la Mc ban can den su h8 trq ci5a Cling nghe thong tin. CEng nghe th8ng tin dA phat trien het sirc mash me trong nherng Mtn gin day. Ngay nay bon c6 the tre chuyen, chia se hInh anh vai nhOng ngutri bon, ngueri than trong gia dlnh 6 Ichoang cach nua vemg trai slat hay xa ham nera, giteg nhu ban dang tr6 chuyen vai mot ngued a ngay wit minh vay. CO the nal ding nghe phi trien dA dem con ngutri lei gin nhau has. KhOng chi c6 vay, cac chuang trinh ling dung dm dimg has. Kh8ng can bit dean Cling nghe thong tin con el, con ngtred c6 cuOc sting vet s6 sach nhu truac, hien nay tat ca dA 6 the luu tren may vi tinh veri met thiet bj luu ter vo cling nhet gm. Han the 'Oa vai met s6 chuong trinh dit tien, chung ta con duqc h8 trq ca viec hooch djnh phuang huerng phat trien cho doanh nghiep. fly can a yen de di neu 6 tren? Lieu CEng nghe th8ng tin c6 gulp gi thing ta tong viec tim dubng di lei khi den met not ma ta Ich8ng bier? KhOng phai Mc nao ta cling mang theo Laptop hay may vi fish, viec di chuyen you ciu ta mang theo thiet bj she gon. D6 chinh la met ling ch,mg cfm chuong trinh ban do tren thiet bj di dOng thong mirth. Thiet bj di dOng thong mirth khong can qua xa lo vai chimg ta. D6 chinh la Dien thoai th8ng mirth — Smartphone — hay may tinh bang — Tablet. NhOng thiet bj di dOng de c6 kich thuerc cling nhu tong luqng rho han nhieu so vai mot chiec Laptop. Giao This is trial1 version www.adultpdf.com dien de clang sir dung han, Chao tic bing cam Ong tien lqi han va khong phi thuec vito cac thiet bj di kern Ichac. Han the ars, thief bj di Ong sir dung nen tang phi bien nhu Android, IOS sb hau met kho img dung kiting 16. Chic hin ban dang to hei ring vei kho img dung len nhir vay thl chic chin se c6 Stung img dkuig kern chat lugng, hay cen gqi la "rac", veay lam sao met ngued dung birth thtrbng c6 the phan biet duqc? Cau tra lbi la ban hay yen Lim ve chat Itrqng ciut kho Ong dung Android hay LOS. Bei vi di c6 met (lei ngil uy tin giep to kiem duyet Ong dung truck khi duqc dua len kho Ong ch,mg chung. Han the nem dii v6i met nen tang ce nhieu ngubi sir dung ban dm duqc h6 trq bei chinh nhibig ngtroi dimg truer de. DO chinh la sue manh cea ceng ding ding ngh'e. Tref lai ved yin de chink, ling dung nao glop db to tiet kiem thbi gian tong vies tim dubng? D6 chinh la CEng dung ban d6 tren diet bj di dung. Hien nay met chiec dien thoai thong minh ma kh8ng ce chuang trinh ban d6 thi khe ce the gqi la "thong minh". Hoic vi met 19 do nao Q6 nha sin xuit luqc bet img dung de, thi viec tien ngueri ding lam khi se tau met chiec dign thoai th8ng minh de la tai img dung ban d6. O phan sau t8i se de cap den met ling dung ban di rat phi bien, c6 the nOi la t6t Mat hien hay, de chinh la GoogleMap. Chinh nhUng nhting 19 do tren da tao Ong luc cho em tim hieu va xay dung img dung chia se vi tri tren nen tang Android sir dung ban di Google Map. Chi tiet ye du an nay em se With bay b nhemg phlin sau. Chuang 1: Geri thieu bai toan Chuang 2: Gioi thieu he dieu lulnh Android Chuang 3: Ting quan ve GoogleMap API Chuang 4: Chuang With 2Friend Chuang 5: Phu lye: Code met s6 chi= Ming chinh Tii lieu tham This is trial2 version www.adultpdf.com CHVONG 1. Glen THISU BAI TORN 1.1. Vai net ve GoogleMap Nhu citing ta da biet, bit chip suy thoai kinh te, nganh ding nghe thong tin van dang phat trien v6i mot toe dg cheng m$t. Trong thbi gian gin day danh diu sy phat trien rat manh cua cac thiet bj dien thoai thong mirth (Smartphone). MOt trong nhung (mg dung quart tong nhAt va co the nal la "khan the thieu" d6 chinh la ang dung ban db. Ban d6 GoogleMap duqc xay dung ben ceng ty Google bang the hinh anh vg tinh va viec di tim hieu throng ph6 thuc te. C6 mot so than vien cfra Google duqc tra ltrang cao voi c8ng viec dap xe dap c6 gin thiet bj cita Google de ghi lai va chyp anh dutmg ph6. Cong viec nay ton rat nhieu thbi gian, nhung nha d6 ma ban d6 GoogleMap co dO chinh xac rat cao va nhOt fit thutmg xuyen. ling dung Maps hay chinh la GoogleMap gulp ngutri dung c6 the sir dung ban d6 nay trong viec tim duang di. 6 phart sau toi se gieri thieu ky han ve ung dung thy. 1.2. Nhftng gl GoogleMap khong ht) trq? DOng hanh v6i su phat trien cfut ding nghe, new nay each con ngubi giao tiep cling di kit di. ChAng ta khong chi chia se hinh anh, loi nei, van ban ma yeti thiet bj di dOng thong mirth ta con c6 the chia se ca vi tri ciut mink. Cac thiet bj di dOng thong mirth hau het deu tich hqp tinh nang GPS — gitip djnh vi Nei tri sir dung tin hieu vg tinh. Ngoai cac eh& nang co ban ma GoogleMap da cung cap nhtr tim dtrimg, chi dutmg, dieu huang... co mot chirc nang quan trong khac ma GoogleMap da dimg trq da la firth nang chia se vi tri vUi ban be, ngutri than(Google Latitude). Chinh dieu nay da thitc dAy ten xay dung mot (mg dung chia se vj tri ban be teen Google Map. 1.3. Tai sao lqi cAn ting dyng chia se vj tri? Nhu ta da thAy, co se dft lieu de luu aft da lieu ban d6 ctia ca the giOi la rat 1611, hay c6 the not la v8 cling lon. Chic chin khong the nao luu trtt tit ca cac dia diem, cac nha hang, dja danh tren ban d6 duqc. Cho du Google co co ging lam dieu do thi dft lieu se khong the cOp nhOt thu?mg xuyen, trir khi moi khu ph6 tren the giei deu co than vien cita Google. Chinh vi v$y thing ta co the S thanh mot ngtrtri clang tot bung, bang each giam di ganh n$ng rill* dja diem cho Google. Chang ta c6 the to cop nhOt vi tri cilia minh. Tuy nhien, khong phiti bit tit ai, bit cir lac nao ta cling mutin chia se vj tri cfta minh. Doi khi ta chi mut% chia se yen ngutri than trong gia dinh, hay bon be ma then... Con nhieu van de !chic nfta, nhung da chinh la ljf do de WI xay dung chuong trinh nay. This is trial version www.adultpdf.com 3 1.4. Mei truirng boat (long Chuang trinh nay se &gm xay dvng tren he dieu hanh Android — MOt nen dang phat trien rat manh tren cac thiet bj di dOng — vi sir dtmg Google Map API. 1.4.1. Tgi sao ding Android? Android la mOt hg dieu hanh ma nguan ma, chlnh vi the nen ne duqc phit trien rat da dang theo nhieu hue ng khic nhau. ChInh dieu da da &rip cho cac nhi sin xuAt clang hon tong viec cho ra nhUng sin pham het sirc da ding, gifip thiet bi di ding Android c6 s6 ngteri sir dyng kh6ng 16. Ben milt 46 gii thanh mOt thiet bi Android ding re hon thiet bj chay IOS hay Window phone ma firth ruing yin kitting he thua kern. a 1.4.2. Google Map API la gi? Google Map API li mOt Giao dien 1#p trinh img clang do Google cung cap. NO glop cho lap trinh vien c6 the sir citing chinh bin d6 cua Google de xay citing img dung cila mirth. Tuy nhien khong phii tat ca the firth rang cua Google Map day di dau duce cung at) a day, chinh vi the ngubi 18p trinh vien phii tim each sir clang th$t Idiot) leo de giai quyet cac van de bii toin (tat ra. Chi tiet ve Google Map API se duct de Op a pitan sau. 1.4.3. Server qudn ly hogt Ong M#c da Google Map API cung cap cho to mOt ban dO tuong d61 hoin chink, nhung da chi li img dtmg ben phut ngubi dung. De ling Mpg c6 the hoat ding can c6 mOt Server. Server nay c6 nhiem vµ luu thong tin tai khoin cua ngubi dimg, luu v1 tri ngubi dimg vi thvc hien mOt so chirc niing khic. Server nay can ducm via bang mOt non net ph6 bien vi khong phv thuOc vio hg dieu birth, da chinh la nein ngft Java. Server khong an c6 giao dien 46 hoa, chi co nhiem vv nh#rt yeu tau tir phia thiet bj kith, zir ly vi tri ve ket qui. Tuy nhien, da la ding viec cim ngu&i 1#p trinh, ngubi sir clang img citing nay khong an quan tam server lam gi ma chi can thao tic tren thiet bj dm mirth. This is trial4 version www.adultpdf.com CHUONG 2. GIefITHIEU a DIEU HANH ANDROID 2.1. Android la gi? Android la melt Hg dieu !Anti dinh cho cac thiet bj di dOng nhu dien thoai thong minh hay may tinh bang. Android duqc xay dung Iron nen tang Linux va sir dung nem ng0 Java. Ban du, Android duqc phat trien boi TOng cong ty Android vii str ho trq tai chinh cua Google. VI° Min 2005, Google di chinh that mua lai ding ty nay. Tuy nhien vao theri diem da Android van chug duct ra met. Den aim 2007 Android mai ra mit cling yeti tuyen b6 thanh lip Lien minh thiet bj elm tay ma: mOt hiep hOi g6m cac ding ty phan mem, phAn ming va vien th8ng yeti mac tieu day math cac tieu chuan ma cho cac thiet bi di dOng. Thief bj du tier chug Android duqc ban ra thing 10 mitn 2008. Android la he dieu hanh c6 ma nguln ma va Google phat hanh ml nguln theo gily phip Apache — mOt giay phep kW:Mg c6 nhieu rang butjc. Chinh dieu nay di glop cho cac nha san xuet thiet bj, mpg di dOng va cat lelp trinh vien duqc dieu chinh va phan phOi Android mOt cach tar do. Tinh den thed diem thing 10 niun 2012 — 4 Titan sau khi thiet bj Android du tien duqc cong b6, di ce khoing 700.000 img dung tren Android, va s6 luqt tai ting dung tree elm hang 'ring dung Google Play &cc tinh khoang 25 ti luqt. Chinh nhUng uu the nhu v1y ma Android di fret that nen tang dien thoai di dOng thong minh phO bier nhit the gi6i, vtrqt qua Symbian vao quy bOn nim 2010. Android duqc cac c8ng ty c8ng nghe sir dung khi h9 an mOt hg dieu Minh khong mItng ne, c6 kha ning tinh chinh va gia thenh r8 chay tren cac thiet bj cong nghe cao. Ket qua la mic du duqc thiet ke de chay tren then thoai, may tinh bang, Android di xuit hien tren nhieu thiet bj khac nhu TV, may chai game va nhieu thiet bj 'chic. Tinh den tit diem quy ba nam 2012, Android di chiem den 75% thj phlin dien thoai thong minh tren town the giai. CO tong cong 500 trieu thiet bj di &Km kich hos va 1,3 trieu luqt kich host moi ngay. St; thanh c8ng cim hg dieu hanh nay cling Man ne frac thanh muc tieu trong the Ai hen lien quan den bAng phat minh, hay can gui la "cuOc chien dien thoai thong rninh" gift cac c8ng ty ding nghe. This is trial5 version www.adultpdf.com 2.2. Lich sir phit tries 2.2.1. Sy! ra del cues Android Tang Gang ty Android (Android, Inc.) duqc thanh lap tai Palo Alto, California vao thing 10 nAm 2003 beri Andy Rubin (thing sang lap ding ty Danger), Rich Miner (clang sang lap Tang cong ty Vien thong Wildfire), Nick Sear (timg 11 PM giam doc T-Mobile), va Chris White (truing thiet ke va giao dien tai WebTV) de phat trier, theo to i cita Rubin, "cic thiet bi di &mg thong minh han c6 the biet duqc vi tri va se( thich cita ngubi dimg". DV nhang ngutri thanh lap vi shin vien deu la 'tang ngubi c6 tieng am, Tang cong ty Android boat dOng met each Am thim, chi tiet 10 r&ng hq dang lam phan mem (lath cho din thoai di dOng. Trong nAm do, Rubin het kinh phi. Steve Perlman, mOt ngubi ban than cita Rubin, mang cho Cog 10.000 USD tien mat nhtmg tit ch& . tham gia vao cong ty. Tang cong ty Android duqc Google mua lai vao ngay 17 thing 8 nAm 2005, bien n6 thanh met be phan trvc thutic Google. Sau thucmg vv nay, nliimg nhan vien chit chat dm Tang cong ty Android An tiep tic a lai cong ty lam viec. Vao thbi diem da kitting c6 nhieu th8ng tin ve cong ty Android, nhtmg dA co nhang loci clan rang Goolge dir tinh tham gia thi trutmg thiet bi di dung sau buem di nay. Tai Google, them do Rubin dung du dA phat triers met nen tang thiet bi di dOng tren nen nhan Linux. Google quing bi nen tang nay cho the nha sin xuid dien thoai va cac mang vien thong ding 16i him se cung cep mOt he thong linh hoot va c6 !chi nang Wang cap. Google dA lien he vii hang loaf hang phan cling ding nhu dai tic phan mem. Ngay 5 thing 11 nAm 2007, lien minh thiet bi cam tay ma, hay con gqi la Open Handset Alliance, met hiep Mit gem nhieu cling ty trong de c6 Texas Instrusments, tap doan Broadcom, Google, HTC, Intel, LG, tap doan Marvell Technology, Motorola, Nvidia, Qualcom, Samsung Electronics, Sprint Nextel va T-Mobile duqc thanh lap shim mac Bich phat tries cac tieu chuAn ma cho thiet bi di Ong. Cling chinh thbi diem de, Android cling duqc ra mit yeti vai tr6 la san phatt n Mu tien ciza Lien minh. Chiec di'en thoai chay Android du tien duqc ban ra la HTC Dream, chay tren nen tang nhAn Linux phien ban 2.6, phat hanh ngay 22 thing 10 aim 2008. Su trtmg cita Android la met con Robot mau xanh la coy do hang thiet ke Irina Blok tai California ye. This is trial6 version www.adultpdf.com 2.2.2. Cdc Alen bdn Android a. Android 1.0 Ra mat: 23 thing 11 nom 2008. Android 1.0 rat nguyen sa, tich hap sin khi rang deng bO der lieu yeti cac djch vu trqc tuy'en aim Google nhu Gmail, Google Calendar va Contacts, mot trinh phat media, hit trq Wi-Fi va Bluetooth, thanh tang thai hien thi cac thong bao img dung va mot img dung chap anh (camera) tuy chua cho phip thay doi dt) phan giai va chat luqng anh nhu cac thiet bi ngay nay. HTC Dream la don smartphone thucmg mai ding Android du tien v6i kieu Bang tract kem ban phim vet lg. Phien ban Android 1.0 chua duqc Google ct(ft ten, do truck 46 ten g9i Astro Boy hay Bender. b. Android 1.1 Ra mat: 9 dying 2 nom 2009. Ben quilt so phien bitn, Google da bit diu dua he thong ten g9i vio cac phien ban Android. Tuy chua chinh thirc itp dung nhtmg Android 1.1 da c6 ten Petit Four. Kitting bao gem nhieu tinh rang, phien ban nay be sung mitt so chirc ming meri cho Google Maps Men thi chi tier hart, ban phim a° g9i dien thoai da c6 the hien thi hoc An Mil gqi, chucmg trinh SMS cho OCT ngubi dung luu tap tin dish kern. Android 1.1 sirs mot s6 loi trong Android 1.0. c. Android 1.5 Cupcake Ra mitt: 30 thing 4 !Am 2009. Cupcake, ten diu tien ip dung cho phien ban Android. Cupcake mang nhieu tinh nang meri nhu ban phim io c6 kha Wing chr loan tir dang go, tir dien tir nger do ngutti dung at ra, ho trq widget tren man hinh chink, quay phim va phat lai video clip, luqc sir then gian cuOc goi, the 40 to d'Ong xoay man hinh theo hueing sir dung (screen rotation). TrInh duy'e't web trong Cupcake c6 them kha nang sao chop va dan. Ngoii ra, phien ban nay cho phep ngutti dimg hien tit hinh brill trong danh ba, mot diem thu vi ma hku het ngtroi dimg dien thoai di dOng muon c6. Man hinh chuyen tei va hinh anh khi khoi 4Ong may duqc lam m6i. d. Android 1.6 Donut Ra mat: 30 thing 9 nam 2009 Donut nang cap cac chirc nang trong phien ban Cupcake, met Ong chirc rang tim kiem bing giqng n6i va ky to den bookmark va danh ba. Android Market tit thanh kho img dung chinh de nguiti &mg tim kiem va xem cac img dung Android. !ling dung This is trial7 version www.adultpdf.com chyp anh va quay phim trong Donut nhanh hen. Hg dieu birth ho trq man hinh cep 40 phan giai 16n ham, huOng den clic the hg smartphone min hinh km. e. Android 2.0 Eclair Ra mat: 26 thing 10 nam 2009. Chi sau gin mOt than ra mat Donut (Android 1.6), Google tung ra Eclair, phien ban dugc nhan djnh la buck di len dm he dien hinh nay. Eclair c6 rat nhieu chi tien, tit giao dien den (mg dung ben trong he' thOng. Ung dyng chyp anh tang cubng them chitc nang zoom (phang to), can bang trAng, ha trq den flash va cac hieu img mau sic. th0ng hoat dOng On djnh hen, cal thien kha nang xit 1Y, hi5 tug ket not Bluetooth tot hen, dac biet thy chcon ding hi) nhieu tai 'Moan. Met diem thuan tien dugc danh gia cao lac bay gib la giao dien danh ba cho phep nhan chgn vac' mOt anh danh ba de g9i, nhan tin hay email den hq. Giao dien img dyng Lich bleu (Calendar) He cung dugc thay dOi. Eclair IA phien ban Android du tien ha trq anh nen dOng (live wallpaper). Tuy nhien thy chqn nay tieu ten kha nhieu pin vi titi nguyen may. f. Android 2.2 Froyo Ra mat: 20 thing 5 nam 2010. Tir phien bin 2.0 tro di, Android &I din hoan thien hen. Phie'n bitn 2.2 (Froyo) duce tich hqp Adobe Flash, keo theo hang lottt img dyng va game. ND:raj dung ding c6 the xem video clip nen Flash nhu YouTube va "ra lenh" thyc hien cube goi qua ket net Bluetooth. MOt chic nang mai trong Froyo dugc them ngubi dimg luu dOng yeu thich IA USB Tethering va Wi-Fi Hotspot, thin chiec smartphone Android thanh thiet bj phat sang Wi-Fi to ket net 3G. Tinh tiling nay dugc sit dyng rat phi) hien den ngay nay. Len diu tien Android cho phep chi dat img dyng (app) len the nher SD thay vi mac djnh chi ngay vac' b0 nher trong cita diet bj. MOt chitc nang mei cita Froyo do la mat khau di ha trq se va chit se. Thiet bj du den mang nhan Froyo ra mat thj trubng la HTC Nexus One. g. Android 2.3 Gingerbread Ra mat: 6 thing 12 nam 2010. Den cuOi am 2012, Gingerbread yin dang duce sit dung eon rat nhieu thiet bj dimg Android, chiem den hen mOt nira (54%). Google hqp tic Samsung trinh lang dong smartphone diu tien sit dyng Gingerbread mang ten Nexus S, ha trq cong nghe giao tiep tam gin NFC. This is trial8 version www.adultpdf.com Gingerbread dua vao he th6ng met ceng oar quart 15r tai tip tin, cho phep theo dei va truy xuit den cac tip tin da tai ye may. He thong nay hiS trq nhieu camera cho cac thiet bj c6 camera mit sau va trtrac, quan 15r nguton pin hieu qua han, fiat kiem thin ltrang pin. Phien ban nay khic phuc !chi nhieu loi tir Froyo, kern theo met so dieu chinh trong giao dien ngtroi dung. h. Android 3.0 Honeycomb Ra mot: 22 thing 2 nrun 2011. Day Hiring chi la met phi'en ban, ma ce the xem la met the he Android du tien anti rieng cho may tinh bang (tablet), ra mot cling tablet Motorola XOOM. Mang nhemg firth nang tir the he Android 2.; Android 3.0 cal tien giao dien phit hqp veri each sir dung may tinh bang, ban phim ao than alien han, h8 trq xir 13 , da the vu (multi-tasking), cho phdp chuyen doi qua lei cac ling dung dang cling chay. Kherng chi c6 be mit dirge trau chu6t, phin lei he then c6 the cal tien ttrcmg thich yeti plan ding nhu hO trq chip xir ljr (CPU) da I8i, tang toe plan ding... Android 3.0 dit nen meng quan trong cho the he Android 4.x hqp nhAt, 'chic phuc stir phan mang cila Android (c6 cac phien ban rieng danh cho smartphone vi tablet). i. Android 4.0 Ice Cream Sandwich Ra mot: 19 thing 10 nam 2011. "Ice Cream Sandwich" (ICS) la the he Android dirge mong dqi nhit den nay, ra dtri ding ding smartphone bom ten Samsung Galaxy Nexus, the hg smartphone diu ten sir dung ICS. Android 4.0 dua chirc nang truy xuat nhanh cac ling dung thutmg dung vao phir' ben duOi giao dien chit, thy bien widget, sip xep vi duyet danh sach ung dung hon. a Cac img dung a c6 the truy xuit nhanh tir man hinh khOa thiet bi (Lock screen), vao thtri diem d6 cac hang san xuAt thiet bj chi mai cho phep Camera ce the chan nhanh tir Lock screen. Ice Cream Sandwich host dOng muqt ma, nhanh va dpp han cac phial ban fru& d6. j. Android 4.1 Jelly Bean Ra mit: 9 thing 7 nam 2012. May tinh bang Nexus 7, san phim hqp the gins Google va Asus, lit thiet bj diu tien sir dung Jelly Bean. Android 4.1 'Ling dm hog dOng cho he dieu hanh dua Google, tit thenh he dieu hanh cho thiet bj di dOng hang diu hien nay, de daa ca "8ng lan" Windows. KM ring sip xep giao dien chit va widget tong Jelly Bean c6 !dui nang thy bien cao va rat linh hoot. He thong hO trq dich vu vi dien to Google Wallet, dic biet trinh This is trial9 version www.adultpdf.com duyet web mac djnh trong Android duqc thay the bt5i dai dien ten tan: Chrome, yeti kha neng dOng ba du lieu theo tai khoin vai ban Google Chrome tren may tinh. k. Android 4.2 Jelly Bean Ra mat: 29 thang 10 nem 2012. Chi sau gen nem thang ra mat Android 4.1, Google nep tyc tang cep cho Android vii phien ban 4.2 va vin mang ten Jelly Bean. Android 4.2 tiep tpc mang den nhfing cai tien hap din cho (mg ch,mg chop inh (Camera) Sur HDR, Photo Sphere, hieu (mg link Google Now, dua tinh nen luta chqn to rat hay trong ban phim so. Chirc rang ho trq nhieu tai Idioan ngutri dimg Ian dau tien duqc ap thing trong Android 4.2 nhung chi c6 ngutti den may tinh bang thin huerng chile rang nay. 1. Android 4.3 Jelly Bean Ra tat: 24 than 7 nem 2013. Android 4.3 Iii la mot fling cep non cua phien ban mang ten Jelly Bean. Phi'en ban nay hi) them tinh nang Bluetooth rang luqng thip, OpenGL ES 3.0, tit) , chqn Wifi luSn bat, hi trq ngon ngit doe tit phai sang trai... Vii phien ban dui ba mang ten Jelly Bean, Android dang din hoan thien han, yeti nheng tinh neng mai, Android hila hen se thu but nhieu ngay cang ngutri sit dung. m. Android 4.4 KitKat Ra mat: 31 thing 10 nem 2013. Mac du rat nhieu nguiti de do doin phien ban Android mei c6 ten gqi "Key Lime Pie" trong suOt mot thei gian dai, Google de cho ra mat phien ban 4.4 vii ten gqi KitKat. Android 4.4 KitKat bao gem rat nhieu ruing cap trong he thOng va (mg ch,mg, nhung diem net bat that ciia phien ban nay de la he try cac thiet bj co cau firth that) hot. KitKat yeu eau be the tei thieu (RAM) chi la 512 MB, giiip cho cac thiet bj cAu clang. hinh thep c6 the thing cap va trai nghiem mot cach a This is trial10 version www.adultpdf.com 2.3. Kien true 14 diet' birth Android Applications l Applications Famework to chuc Ling Liumi Android Runtime Libraries IH;1 (Thai 'Tan chay Ar droith Linux Kernel '. HIM 2-1: Ctic think pkin csia kf dl kink Android 2.3.L Lima Kernel DOi vei nhCmg phien ban truer, Android duct xay dung teen 130 than Linux 2.6 cho nheng djch vg cot lei nhu security, memory management, process management, network stack, driver model. BO than nay lam tillitm vu nhu mOt lap trung gian ktt not pith' ring thiet bj ya phan *rig dung. time Anima(' NDK apps Android SDK 241 apps Android app framework Standard libraries Mink 2-2: M6 kink kw tic gilta may do Dalvik vi Native code JNI: Java Native Interface (Tuang ty Ichai nitm Application Programming Interface) la mOt 13 0. framework cho phi!) ma lOnh vitt bang Java chay ten may ao java This is trial version www.adultpdf.com 11 c6 the goi hoc duqc gqi boi met ung dung viet bing native code ((m g dung duqc viet cho met phAn ding cu the va tren met he dieu !faith cu the) !mac nhUng be thu vien viet bing C, C++ hoc Assembly. Bang cfich sir dung NI, Android cho ph6p cac ling dung chay tren may ao Dalvik c6 the sir dung nhfing phucmg thirc ductc viet bang cac ng6n ngft cep thAp nhu: C, C++, Assembly. Qua de cac nha phat trien ling dung ca the xay dung ling dung dua ten cac be thu vien viet bing C, C++, Assembly 'them tang Mc de thuc thi cim ling dung hoc sir dung ntrang firth nang mirc thep ma non ngft Java Ichong hie trq. Tuy nhien ngtrai phat trien ling dung an phai can nhac su gia tang de phirc 4p cim ling dung khi quyet djnh sir (king cac be thu vien nay. 2.3.2. Libraries Day la be cac thu vien xay dung nen cac chirc nang chinh dm Android System C library: Day la tOp cac thu vien he thong. Thu vien nay duqc viet bang ngon ngft C, C++ chuen c6 the pi duqc thong qua giao dien Java Media FrameWork: Day la be thu vien h6 trq trinh dien va ghi cac djnh dung am thanh, hinh anh phe bien. Surface manager: Quan ly hien thj nei dung 2D va 3D. Cho ph6p tvo cac ciza so giao OpenGL: HO trq xay dung ling clung de hqa 2D va 3D. - SSL: Cung cap chile nang bao inOt cho fiat bi SGL: Engine he trq M hqa 2D. Free Type: HO trq cac Font Bitmap va vector SQLite: Met co sir du lieu nhe gqn va mph me. Cung cep be may co s6 du lieu duqc nhimg trong thiet bj. Webkit: Ho trq hien thj nei dung website. 2.3.3. Android Runtime He dieu hanh Android tich hqp sin met top hqp the thu vien cot 16i, cung cep heu het cac chirc rang. Mqi ling dung ciut Android chay tren met tien trinh cua rieng n6 cling v6i met the hien cim may ao Dalvik. May ao Dalvik thuc to la met bien the dm may ao Java duqc sira Mi, be sung cac cling nghe dOc tnrng cim thiet bi di Mug. NO duqc xay dung veri intic dich lam cho cac thiet bj di (king c6 the chay nhieu may k met cach hieu qua. Tnrem khi chay, mei ling dung Android deli duqc convert thanh file thuc thi Arai QM dm nen Dalvik Executable (.dex). Dinh long nay duqc thiet ke de phi hqp veri This is trial12 version www.adultpdf.com cac thiet bj han the ve b0 :the sung nhu toe do xi 1), . Ngoai chic flan ke tren, may lo Dalvik cem sir dung b0 nhan Linux de cung cap cac tinh rang nhu thread, low-level memory management. 2.3.4. Application Framework Tang nay cia hg dieu hanh Android cung cap mot nen tang phat trien img dung ma qua (16 cho phep cac lap trinh vien, cac nha phat trien img dung ci kha fling tao ra cac img dung vo cling sang tao va phong phi. Cac rata phat trien (mg dung duqc to do sir dung cac tinh nang cao cap ctla diet bj phan cing nhu: thong tin dinh vj dia 1ST, kha nang chay djch vu cluth ne'n, thiet lip dOng h0 bao thic, them notification vao status bar cia man hinh thiet Ngubi phat trien img dung duqc phdp sir dung day di b0 API duqc dimg tong cac img dung Itch hqp sin cia Android. Kien trim img dung cia Android duqc thiet ke nham muc dich don gian h6a viec tai sir dung cac thanh phan. Qua d6 bat Id (mg dung nao ding ci the cong b6 cac tinh thing ma ne mu6n chia se cho cac img dung khac (VD: Ong dung email c6 muon cac img dung khac c6 the sir dung tinh ring gin mail cia n6). Phucmg phap tucmg to cho phep cac thanh phan co the duqc thay the ben ngubi sir dung. Tang nay bao g6m met top cac services va fininh phan sau: - View System: Ding de xay dung img dung c6 cac d6i ttrqng giao dien nhu list, grid, texbox, button... hay ci the thing met trinh duyen web vio irng dung. - Content Provider: Cho phep cac img dung c6 the truy xuAt do lieu tar the *rig dung khic hoc chia se der lieu giera ching. - Resource Manager: Cung cap kha ring truy 'mat cac tai nguyen nhu hinh anh hoac file giao dien (Layout). - Notification Manager: Cung cap Idyl tiling hien thj thong bio tren thanh trang thiti (Status bar). - Activity Manager: Day la thanh plan quart trqng nhat, n6 giip img dung quitn ly Ong dbi cia met Activity. - Telephony Manager: Cung cap thu vien de truy neat den cac djch vu dien thoai hay thong tin thug bao cia ngubi ding. - Location Manager: Cung cap thu vien h6 trq ngubi ding dinh vj this& bj dua tren GPS hoac mpg Ichong day witY3G. This is trial13 version www.adultpdf.com 2.3.5. Application Tang nay chinh la tang china cac img dung duct phut trien boi !Op trinh vi'en, the nha phut trien phan mem. Ngoai met s6 img clung duqc Android tich hqp s&n nhu email, SMS, trinh duyet web, danh ba... thi ngiteri dimg c6 the de dung cai dOt them cac Ung dung tin Google Play hay cac chq Ung di,mg Ichac. 2.4. ling dyng tren that b$ Android 2.4.1. Nhfing gldi hgn crra thiit 14 di ding Mk di' cac thiet bj di dung thong minh c6 the thuc hien nhnng chin Ming tucmg to nhu met chiec may tinh nhu chay da nhiem, xis 19 de hqa... Nhung thuc chat de van la met thiet N vOi be nher va pin c6 hon. Ta c6 the dtly mph hieu suet hour dung cue thiet bj len, tuy [Alien dieu de loi clang nghia vOi viec tieu Mn nhieu dien nAng va tai nguyen ham, lam gilan then gian sir dung thiet N. Chinh vi the, khfic veri trinh img dung tren may tinh thong thueng, Mil viet ling dung tren thiet bj di &Ong to can chi' 9 den nhUng gied hen sau: - Kha rang xir 19, c6 hart - BO nher co hon - Pin co gieri hon - Nen tang hg dieu hanh lchac nhau - Thanh phAn phan cling khac nhau - Kich thuerc man hinh nho - Giao dien don gian - Bang thong mpg c6 gi6i lion (3G, GPRS) - Ket n61 mang Ichong 6n djnh. 2.4.2. Ngen ngit 41p trinh trinh chinh thlic cue Android la Java. Mk du cat img dung tren NgAn Android duqc vitt bang nein agar Java, tuy nhien ban than Android lui !cluing the chay duqc cac t$p tin Java c6 dung .jar. Ngen ner Java sir dung trong Android khong phai la town be thu vier J2EE (Java 2 Platform, Enterprise Editiion) ma chi la met pit nho de xay dung nun may ao Dalvik. Din tren may ao Java cila Sun, Google dA tinh chinh va phut trien nen may ao Dalvik de bien djch cac top tin Java veri Mc de nhanh hon va nhe hon. Den phien ban Froyo 2.2, Android dA ha My Just-in-time Compiler (JIT) lam tang the de bien djch Java len tir 2 den 5 lin. This is trial14 version www.adultpdf.com 2.4.3. Mei Irtreng ltlp trinh JDK: JDK la m6i tru&ng clung di vitt the Ong dung Java. MOt 130 JDK gOm c6 JRE (Java Runtime Enviroment) va cac ding cp bien djch (javac), trinh thuc thi (Java), gb loi, cac thu vien, be gia lap dien thoai... Eclipse: Mei trtreng lap trinh chinh that cita Android la Eclipse yeti su hO trq cita Plugin ADT (Android Development Tool). Ngu&i lap trinh c6 the de clang tai 1)0 cong Gist nay tren trang chit cita Google. Met so thinh phAn caa ADT: ✓ Da (Dalvik Cross-Assembler): C6 chirc nAng chuyen dOi cac 16p Java a duqc bien djch thanh met file nhj phan (.dex) de chay tren may io Dalvik ✓ Aapt (Android Asset Packing Tool): CO chirc thing doing g6i cac tap tin .dex thanh tap tin .apk de ngutri ding c6 the cai det tren thiet bj di dOng ✓ Adb (Android Debug Bridge): Day la met au nOi de chuyin va cai dat img dung len trinh gia lap (Emulator) hoac tren thiet bj Android that. Thiet bj Android phai duce bat USB Debugging. ✓ Ddms (Dalvik Debug Monitor Service): Cung cap met so Bich vu nhu quan 1$, thong tin tien trinh va nem xep, logcat... This is trial15 version www.adultpdf.com
- Xem thêm -