Home | History | Annotate | Download | only in nougat
      1 page.title=Android N cho Nh pht trin
      2 meta.tags="preview", "androidn"
      3 page.tags="preview", "developer preview"
      4 page.image=images/cards/card-n-apis_2x.png
      5 @jd:body
      6 
      7 
      8 
      9 
     10 <div id="tb-wrapper">
     11 <div id="tb">
     12   <h2>Cc tnh nng chnh cho nh pht trin</h2>
     13   <ol>
     14       <ul style="list-style-type:none;">
     15         <li><a href="#multi-window_support">H tr a ca s</a></li>
     16         <li><a href="#notification_enhancements">Thng bo</a></li>
     17         <li><a href="#jit_aot">Bin dch JIT/AOT</a></li>
     18         <li><a href="#quick_path_to_app_install">Ci t ng dng nhanh chng</a></li>
     19         <li><a href="#doze_on_the_go">Ch  Ng su khi di chuyn</a></li>
     20         <li><a href="#background_optimizations">Ti u ha chy ngm</a></li>
     21         <li><a href="#data_saver">Tit kim d liu</a></li>
     22         <li><a href="#tile_api">API cho  Ci t nhanh</a></li>
     23         <li><a href="#number-blocking">Chn s</a></li>
     24         <li><a href="#call_screening">Sng lc cuc gi</a></li>
     25         <li><a href="#multi-locale_languages">Bn a v ngn ng</a></li>
     26         <li><a href="#icu4">API ICU4J trong Android</a></li>
     27         <li><a href="#gles_32">API OpenGL ES 3.2</a></li>
     28         <li><a href="#android_tv_recording">Ghi li trn Android TV</a></li>
     29         <li><a href="#android_for_work">Android cho Cng vic</a></li>
     30         <li><a href="#accessibility_enhancements">Tr nng</a></li>
     31         <li><a href="#direct_boot">Khi ng Trc tip</a></li>
     32         <li><a href="#key_attestation">Chng thc kha</a></li>
     33         <li><a href="#network_security_config">Cu hnh Bo mt mng</a></li>
     34         <li><a href="#default_trusted_ca">CA an ton mc nh</a></li>
     35         <li><a href="apk_signature_v2">Lc  ch k s v2 cho tp APK</a></li>
     36         <li><a href="#scoped_directory_access">Truy cp th mc theo phm vi</a></li>
     37       </ol>
     38 </div>
     39 </div>
     40 
     41 
     42 
     43 <p>Android N vn ang trong qu trnh pht trin nhng by gi bn c th dng th
     44 di dng N Developer Preview. Cc phn di y s nu bt mt s
     45 tnh nng mi cho nh pht trin. </p>
     46 
     47 <p>
     48   Bn cn xem <a href="{@docRoot}preview/behavior-changes.html">Cc thay i Hnh vi</a>  bit c
     49   nhng phn thay i ca nn tng c th nh hng n ng dng ca bn, hy xem
     50   cc hng dn cho nh pht trin  bit thm v nhng tnh nng chnh v ti xung ti liu <a href="{@docRoot}preview/setup-sdk.html#docs-dl">Tham kho API</a>  bit chi tit v
     51   cc API mi.
     52 </p>
     53 
     54 <h2 id="multi-window_support">H tr a ca s</h2>
     55 
     56 
     57 <p>Trong Android N, chng ti s a vo nn tng mt tnh nng a nhim mi
     58  rt c mong i &mdash; h tr a ca s. </p>
     59 
     60   <p>Gi y ngi dng c th nhanh chng m ng thi hai ng dng trn mn hnh. </p>
     61   <ul>
     62   <li>Trn in thoi v my tnh bng
     63 chy Android N, ngi dng c th chy hai ng dng song song hai bn hoc
     64   trn di trong ch  chia i mn hnh. Ngi dng c th thay i kch thc ca ng dng bng cch ko
     65 thanh phn chia  gia. </li>
     66 
     67 <li>Trn thit b Android TV, cc ng dng c th t t vo <a href="{@docRoot}preview/features/picture-in-picture.html">ch 
     68 hnh-trong-hnh</a>, cho php ng dng tip tc hin th ni dung khi ngi dng duyt web hoc
     69 tng tc vi ng dng khc. Hy xem bn di  bit thm thng tin. </li>
     70   </ul>
     71 
     72 <div class="col-4of10">
     73 <img src="{@docRoot}images/android-7.0/mw-portrait.png" alt="" style="height:460px;padding-left:1em;" id="img-split-screen" />
     74 <p class="img-caption">
     75   <strong>Hnh 1.</strong> Cc ng dng chy trong ch  chia mn hnh.
     76 </p>
     77   </div>
     78 
     79 <p>c bit l trn my tnh bng v cc thit b mn hnh ln khc, vic h tr a ca s
     80 cho php bn mang li nhng cch thc mi thu ht ngi dng. Thm ch bn cn c th cho php ko th trong
     81 ng dng  ngi dng ko ni dung mt cch thun tin vo hoc ra ngoi ng dng ca bn &mdash; y l mt cch
     82 nng cao tri nghim ca ngi dng rt hiu qu. </p>
     83 
     84 <p>Thm tnh nng h tr a mn hnh vo ng dng ca bn v cu hnh cch thc
     85 x l hin th a ca s l iu rt n gin. V d, bn c th ch nh kch thc
     86 ti thiu cho php ca hot ng, ngn ngi dng thay i kch thc ca hot ng nh hn
     87 kch thc . Bn cng c th v hiu ha hin th a ca s cho ng dng ca mnh, gip
     88   m bo h thng s ch hin th ng dng ca bn  ch  ton mn hnh.</p>
     89 
     90 <p>
     91    bit thm thng tin, hy xem ti liu cho nh pht trin <a href="{@docRoot}preview/features/multi-window.html">H tr a ca s</a>
     92 .
     93 </p>
     94 
     95 <h2 id="notification_enhancements">Ci tin thng bo</h2>
     96 
     97 <p>Chng ti  thit k li thng bo trong Android N  chng c s dng d dng v nhanh
     98 hn. Mt s cc thay i bao gm:</p>
     99 
    100 <ul>
    101   <li>
    102     <strong>Cp nht Mu</strong>: Chng ti  cp nht cc mu thng bo 
    103   to im nhn mi cho nh gy n tng v nh i din. Nh pht trin s c th
    104    tn dng cc mu mi nhng ch cn thc hin mt s chnh sa nh trong m ngun ca h.
    105   </li>
    106 
    107   <li>
    108     <strong>Thng bo gp</strong>: H thng c th nhm cc tin nhn
    109   li vi nhau, v d nh theo ch  tin nhn v hin th thnh nhm. Ngi dng c th
    110    thc hin cc thao tc nh Hy hoc Lu tr chng ngay ti ch. Nu bn tng
    111    trin khai cc thng bo cho Android Wear th bn  lm quen vi
    112    m hnh ny.
    113   </li>
    114 
    115   <li>
    116     <strong>Tr li trc tip</strong>: i vi nhng ng dng giao tip theo thi gian thc,
    117    h thng Android s h tr tr li ngay ti ch  ngi dng c th nhanh chng phn hi li
    118    mt tin nhn SMS hoc tin nhn vn bn trc tip bn trong giao din thng bo .
    119   </li>
    120 
    121   <li>
    122     <strong>Dng xem ty chnh</strong>: Hai API mi cho php bn s dng cc trang tr
    123    h thng nh tiu  v hnh ng ca thng bo khi s dng cc dng xem
    124    ty chnh trong thng bo.
    125   </li>
    126 </ul>
    127 
    128 <div class="col-4of12">
    129   <img src="{@docRoot}images/android-7.0/notifications-1.png" alt="" style="padding:.5em;max-width:226px">
    130 </div>
    131 
    132 <div class="col-4of12">
    133   <img src="{@docRoot}images/android-7.0/notifications-3.png" alt="" style="padding:.5em;max-width:226px">
    134 </div>
    135 
    136 <div class="col-4of12">
    137   <img src="{@docRoot}images/android-7.0/notifications-2.png" alt="" style="padding:.5em;max-width:226px">
    138 </div>
    139 
    140 
    141 <p class="img-caption">
    142   <strong>Hnh 2.</strong> Thng bo gp v tr li trc tip.
    143 </p>
    144 
    145 <p>Hy xem
    146   hng dn v <a href="{@docRoot}preview/features/notification-updates.html">Thng bo</a>
    147   bit cch trin khai cc tnh nng mi ny.</p>
    148 
    149 
    150 
    151 <h2 id="jit_aot">Bin dch JIT/AOT theo cu hnh</h2>
    152 
    153 <p>Trong Android N, chng ti  b sung mt trnh bin dch Just in Time (JIT) c m c cu hnh cho
    154 ART, cho php n nng cao hiu nng ca cc ng dng Android tc th khi
    155 chy. Trnh bin dch JIT b tr thm cho trnh bin dch Ahead of Time (AOT) ca ART
    156 v gip ci hin hiu nng thi gian chy, tit kim khng gian lu tr v tng tc  cc bn cp nht ca
    157 ng dng v cp nht ca h thng.</p>
    158 
    159 <p>Bin dch theo cu hnh cho php ART qun l qu trnh bin dch AOT/JIT ca tng ng dng
    160 ty theo s dng thc t cng nh cc iu kin trn thit b. V
    161 d, ART s duy tr mt cu hnh cho cc phng thc hay dng nht ca mi ng dng v c th bin dch trc
    162 ri to b m cho cc phng thc   c hiu nng cao nht. Nhng phn khc ca ng dng
    163 s c gi nguyn khng bin dch cho n khi chng thc s c s dng.</p>
    164 
    165 <p>Bn cnh nng cao hiu nng cho cc phn chnh ca ng dng, qu trnh bin dch
    166 theo cu hnh cn gip gim tng lng RAM c s dng ca ng dng, bao gm c cc
    167 tp nh phn lin quan. Tnh nng ny c bit quan trng trn cc thit b t b nh.</p>
    168 
    169 <p>ART s qun l qu trnh bin dch theo cu hnh bng cch gim ti thiu tc ng n
    170 pin ca thit b. N s tin hnh qu trnh bin dch trc ch khi no thit b nhn ri v
    171 ang sc, gip tit kim thi gian v pin bng cch thc hin cng vic  trc.</p>
    172 
    173 <h2 id="quick_path_to_app_install">Ci t ng dng nhanh chng</h2>
    174 
    175 <p>Mt trong nhng li ch d thy nht ca trnh bin dch JIT ca ART l tc  ci t
    176 ng dng v cp nht h thng. Ngay c cc ng dng ln cn vi pht 
    177 ti u v ci t trong Android 6.0 th gi y c th ci t ch trong mt vi
    178 giy. Cc cp nht cho h thng cng s nhanh hn v khng cn bc ti u ha na. </p>
    179 
    180 <h2 id="doze_on_the_go">Ch  Ng su khi di chuyn...</h2>
    181 
    182 <p>Ch  Ng su  c gii thiu trong Android 6.0. y l mt ch  ca h thng gip tit kim pin bng cch tr hon
    183 cc hot ng CPU v mng ca ng dng khi thit b ang nhn ri, v d nh khi thit b
    184 ang nm trn bn hoc trong ngn ko. </p>
    185 
    186 <p>Gi y Ch  Ng su trong Android N  c ci tin thm v tit kim pin ngay c khi ang di chuyn.
    187 Bt k khi no mn hnh ang tt trong mt khong thi gian v thit b khng c cm sc th
    188 Ch  Ng su s p dng tp con ca cc hn ch CPU v mng quen thuc i vi cc ng dng.
    189 iu ny c ngha l ngi dng c th tit kim pin ngay c khi ang mang thit b trong ti
    190 ca h.</p>
    191 
    192 
    193 <img src="/preview/images/doze-diagram-1.png" alt="" id="figure1" />
    194 <p class="img-caption">
    195   <strong>Hnh 3.</strong> Ch  Ng su ang p dng
    196    cc hn ch  ci thin thi lng pin ngay c khi thit b khng c t mt ch.
    197 </p>
    198 
    199 
    200 <p>Sau mt khong thi gian ngn khi mn hnh tt v thit b ch chy bng ngun pin, Ch  Ng su
    201 s hn ch truy cp mng v tr hon cc tc v, ng b. Trong cc khong thi gian
    202 bo tr ngn, cc ng dng s c php truy cp mng v mi tc v/ng b
    203 b tr hon s c thc thi. Bt mn hnh hoc cm sc vo thit b s a
    204 thit b thot khi Ch  Ng su.</p>
    205 
    206 <p>Khi  thit b nm mt ch ln na vi mn hnh c tt v chy bng pin trong mt
    207 khong thi gian th Ch  Ng su s p dng ton b cc hn ch CPU v mng i vi {@link
    208 android.os.PowerManager.WakeLock}, bo thc {@link android.app.AlarmManager} v qut
    209 GPS/Wi-Fi.</p>
    210 
    211 <p>Bn c th p dng cc thc hnh tt nht tng t  iu chnh ng dng ca mnh cho Ch  Ng su cho d
    212 thit b c ang di chuyn hay ng yn. Do , nu bn  cp nht ng dng  x l
    213 Ch  Ng su mt cch tinh t th bn hon ton yn tm. Nu khng, hy tin hnh <a href="{@docRoot}training/monitoring-device-state/doze-standby.html#assessing_your_app">lm cho
    214  ng dng thch ng vi Ch  Ng su</a> ngay.</p>
    215 
    216 <h2 id="background_optimizations">D n Svelte: Ti u ha chy ngm</h2>
    217 
    218 <p>D n Svelte l mt n lc lin tc nhm ti gim s dng RAM ca h thng v cc ng dng
    219 trn khp h sinh thi cc thit b Android. Trong Android N, d n
    220 Svelte tp trung vo vic ti u ha cch thc cc ng dng chy ngm. </p>
    221 
    222 <p>X l chy ngm l mt phn quan trng ca hu ht cc ng dng. Khi s dng ng cch, n
    223 c th gip cho tri nghim ngi dng ca bn tr nn tuyt vi &mdash; tc th, nhanh chng v nhn bit c bi cnh.
    224 Khi khng s dng ng cch, x l chy ngm c th tiu tn RAM (v
    225 pin) mt cch khng cn thit cng nh nh hng n hiu nng h thng cho cc ng dng khc. </p>
    226 
    227 <p>K t Android 5.0, {@link android.app.job.JobScheduler}  tr thnh
    228 cch thc c u tin  thc hin cng vic chy ngm thch hp
    229 cho ngi dng. ng dng c th ln lch cho cc tc v trong khi cho php h thng ti u ha da trn
    230 cc iu kin v b nh, ngun in v kt ni. JobScheduler em li kh nng kim sot v
    231 s n gin, v chng ti mun mi ng dng u s dng n. </p>
    232 
    233 <p>
    234   Mt gii php hiu qu khc l <a href="https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager">
    235   <code>GCMNetworkManager</code></a>, thuc mt phn ca Dch v Google Play, cho php
    236  ln lch tc v tng t vi kh nng tng thch trn cc phin bn Android
    237   c.
    238 </p>
    239 
    240 <p>Chng ti ang tip tc k tha <code>JobScheduler</code> v
    241 <code>GCMNetworkManager</code>  p ng nhiu hn
    242 cc trng hp s dng ca bn &mdash; v d nh trong Android N gi y bn  c th ln lch cho cng vic
    243 chy ngm da vo nhng thay i trong cc Trnh cung cp Ni dung. ng thi, chng ti ang tin hnh
    244 loi b mt s mu c c th lm gim hiu nng h thng,
    245 c bit trn cc thit b t b nh.</p>
    246 
    247 <p>Trong Android N, chng ti s loi b ba truyn pht khng biu th c s dng ph bin &mdash;
    248 {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION}, {@link
    249   android.hardware.Camera#ACTION_NEW_PICTURE} v {@link
    250   android.hardware.Camera#ACTION_NEW_VIDEO} &mdash; bi v cc truyn pht ny c th nh thc
    251 cc tin trnh chy ngm ca nhiu ng dng cng lc v s dng qu mc b nh v pin. Nu
    252 ng dng ca bn ang nhn cc truyn pht ny th hy tn dng N Developer Preview 
    253   chuyn sang <code>JobScheduler</code> v cc API lin quan khc thay th. </p>
    254 
    255 <p>
    256   Hy xem ti liu <a href="{@docRoot}preview/features/background-optimization.html">Ti u ha
    257  Chy ngm</a>  bit thm chi tit.
    258 </p>
    259 
    260 
    261 <h2 id="data_saver">Tit kim d liu</h2>
    262 
    263 <div class="col-5of12" style="margin-right:1.5em;">
    264 <img src="{@docRoot}images/android-7.0/datasaver.png" style="border:2px solid #ddd">
    265 
    266 <p class="img-caption" style="padding-right:2em;">
    267   <strong>Hnh 4.</strong> Tnh nng Tit kim d liu trong mc Settings.
    268 </p>
    269   </div>
    270 
    271 <p>Trong vng i ca mt thit b di ng th chi ph gi cc d liu di ng v c bn
    272 s cao hn gi thnh ca chnh thit b . i vi nhiu ngi dng, d liu di ng l mt
    273 ti nguyn t  h mun s dng tit kim. </p>
    274 
    275 <p>Android N  a vo ch  Tit kim d liu, mt dch v h thng mi gip gim
    276 s dng d liu di ng, cho d l chuyn vng, gn n k thanh ton cc,
    277 hoc trn mt gi d liu tr trc khim tn. Tit kim d liu cho ngi dng kim sot cch thc ng dng
    278 s dng d liu di ng v cho php nh pht trin cung cp dch v hiu qu hn khi Tit kim
    279 d liu c bt. </p>
    280 
    281 <p>Khi ngi dng bt Tit kim d liu trong <strong>Settings</strong> v thit b ang
    282 s dng mt mng c o lu lng th h thng s chn vic s dng d liu chy ngm v truyn tn hiu cho ng dng
    283  s dng t d liu hn  tin cnh bt c khi no c th &mdash; chng hn nh bng cch gii hn
    284 bit rate  truyn pht, gim cht lng hnh nh, tr hon to trc b m  ti u,
    285 v.v. Ngi dng c th lp danh sch cc ng dng c th c php s dng
    286 d liu c tnh lu lng c chy ngm ngay c khi Tit kim d liu c bt.</p>
    287 
    288 <p>Android N m rng lp {@link android.net.ConnectivityManager}  cung cp cho cc ng dng mt
    289 cch thc <a href="{@docRoot}preview/features/data-saver.html#status">truy xut
    290 cc ty chn Tit kim d liu ca ngi dng</a> v <a href="{@docRoot}preview/features/data-saver.html#monitor-changes">theo di
    291 cc thay i ca ty chn</a>. Mi ng dng cn kim tra xem ngi dng   bt Tit kim
    292 D liu hay cha v c gng gii hn s dng d liu chy  tin cnh v chy ngm.</p>
    293 
    294 
    295 <h2 id="tile_api">API cho  Ci t nhanh</h2>
    296 
    297 
    298 <div style="float:right;max-width:320px">
    299 <img src="{@docRoot}images/android-7.0/quicksettings.png" style="padding-left:1.5em;">
    300 
    301 <p class="img-caption" style="padding-left:2em;">
    302   <strong>Hnh 5.</strong> Cc  Ci t nhanh trong vng hin th thng bo.
    303 </p>
    304 
    305 
    306   </div><p>Ci t nhanh l mt cch ph bin v n gin  hin th cc ci t v hnh ng quan trng,
    307 trc tip t khu vc thng bo. Trong Android N, chng ti  m rng phm vi ca
    308 Ci t nhanh  khin n tr nn hu ch v thun tin hn na. </p>
    309 
    310 <p>Chng ti  thm khng gian cho cc  Ci t nhanh m ngi dng c th
    311 truy cp trn ton b mt vng hin th c phn trang bng cch vut sang tri hoc phi. Chng ti cng
    312 cho ngi dng kim sot nhng  Ci t nhanh no s xut hin v v tr xut hin
    313 ca chng &mdash; ngi dng ch cn ko v th  thm hoc di chuyn cc . </p>
    314 
    315 <p>i vi nh pht trin, Android N cng b sung mt API mi cho php nh ngha cc 
    316   Ci t nhanh ca ring bn gip ngi dng d dng truy cp ti cc iu khin v hnh ng quan trng trong ng dng ca bn.</p>
    317 
    318 <p>
    319   Cc  Ci t nhanh c dnh ring cho cc iu khin hoc hnh ng
    320    khn cp hoc thng xuyn c s dng, khng nn dng lm li tt 
    321    khi chy mt ng dng.
    322 </p>
    323 
    324 <p>
    325   Mt khi  nh ngha cc  ca mnh bn c th lm ni chng ln trc ngi dng  h c th thm
    326   cc  ny vo Ci t nhanh bng cch ch cn ko v th.
    327 </p>
    328 
    329 <p>
    330    bit thm thng tin v vic to mt  ng dng, hy xem
    331   <code>android.service.quicksettings.Tile</code> trong ti liu <a href="{@docRoot}preview/setup-sdk.html#docs-dl">Tham kho API</a> c th ti xung.
    332 </p>
    333 
    334 
    335 
    336 <h2 id="number-blocking">Chn s</h2>
    337 
    338 <p>Android N  h tr chn s in thoi trong nn tng ny v cung cp mt
    339  API khun kh cho php cc nh cung cp dch v duy tr mt danh sch s b chn.
    340 ng dng SMS mc nh, ng dng gi in mc nh v cc ng dng ca nh cung cp c th c v
    341 ghi vo danh sch s b chn. Cc ng dng khc khng th truy cp vo danh sch ny.</p>
    342 
    343 <p>Thng qua vic a chn s thnh mt tnh nng tiu chun ca nn tng, Android s cung cp
    344 cch thc thng nht  cc ng dng h tr chn s trn mt lot cc
    345 thit b. Nhng li ch m ng dng c th tn dng gm:</p>
    346 
    347 <ul>
    348   <li> S b chn cuc gi cng s b chn tin nhn vn bn
    349   <li> S b chn c th c duy tr qua cc ln thit lp li v qua nhiu thit b thng qua tnh nng Sao lu &amp;
    350 Khi phc
    351   <li> Nhiu ng dng c th s dng cng mt danh sch s b chn
    352 </ul>
    353 
    354 <p>Ngoi ra, vic tch hp ng dng ca nh mng thng qua Android cng ng ngha l cc nh mng c th
    355 c danh sch s b chn trn thit b v thc hin chn s t pha nh cung cp dch v
    356 cho ngi dng  ngn cc cuc gi v tin nhn vn bn khng mong mun tip cn ngi dng
    357 thng qua bt k phng tin no, v d nh im cui VOIP hoc in thoi chuyn cuc gi.</p>
    358 
    359 <p>
    360    bit thm thng tin, hy xem <code>android.provider.BlockedNumberContract</code>
    361   trong ti liu <a href="{@docRoot}preview/setup-sdk.html#docs-dl">Tham kho
    362  API</a> c th ti xung.
    363 </p>
    364 
    365 <h2 id="call_screening">Sng lc cuc gi</h2>
    366 
    367 <p>
    368   Android N cho php ng dng gi in mc nh sng lc cc cuc gi n. ng dng
    369   gi in thc hin iu ny bng cch thc thi <code>CallScreeningService</code> mi,
    370   cho php ng dng gi in thc hin mt s hnh ng da trn
    371    {@link android.telecom.Call.Details Call.Details} ca cuc gi n nh:
    372 </p>
    373 
    374 <ul>
    375   <li> T chi cuc gi n
    376   <li> Khng cho php cuc gi lu trong nht k cuc gi
    377   <li> Khng hin th thng bo v cuc gi cho ngi dng
    378 </ul>
    379 
    380 <p>
    381    bit thm thng tin, hy xem <code>android.telecom.CallScreeningService</code>
    382   trong ti liu <a href="{@docRoot}preview/setup-sdk.html#docs-dl">Tham kho
    383  API</a> c th ti xung.
    384 </p>
    385 
    386 
    387 <h2 id="multi-locale_languages">H tr a bn a, thm nhiu ngn ng</h2>
    388 
    389 
    390 <p>Android N cho php ngi dng chn <strong>a bn a</strong> trong Settings,
    391  h tr tt hn cho cc trng hp song ng. Cc ng dng c th s dng
    392 mt API mi  truy xut cc bn a c chn ca ngi dng v sau  mang n
    393 tri nghim ngi dng tinh t hn cho ngi dng a bn a &mdash; nh hin th cc kt qu tm kim bng
    394 nhiu ngn ng v khng yu cu dch cc trang web sang ngn ng m
    395 ngi dng  bit.</p>
    396 
    397 <p>Ngoi h tr a bn a, Android N cng m rng danh sch cc ngn ng
    398 kh dng i vi ngi dng. Nn tng ny cung cp hn 25 bin th cho cc ngn ng
    399 c s dng ph bin nh Ting Anh, Ty Ban Nha, Php v -rp. N cng b sung h tr
    400 mt phn cho hn 100 ngn ng mi.</p>
    401 
    402 <p>Cc ng dng c th truy xut danh sch b bn a theo ngi dng bng cch gi <code>LocaleList.GetDefault()</code>.  h tr s lng bn a m rng, Android N ang thay i cch thc
    403 phn gii ti nguyn. Hy m bo bn kim tra v xc minh rng ng dng ca mnh
    404 ang hot ng nh mong mun theo l-gic phn gii ti nguyn mi ny.</p>
    405 
    406 <p> tm hiu v hnh vi phn gii ti nguyn mi v cc thc hnh tt nht bn nn
    407 thc hin theo, hy xem mc <a href="{@docRoot}preview/features/multilingual-support.html">H tr a ngn ng</a>.</p>
    408 
    409 <h2 id="icu4">API ICU4J trong Android</h2>
    410 
    411 <p>
    412   Android N  cung cp mt tp nh cc API <a href="http://site.icu-project.org/">ICU4J</a> trong khun kh Android thuc
    413   gi <code>android.icu</code>. Vic chuyn nhp sang rt d dng v hu ht ch lin quan n
    414   vic i t khng gian tn <code>com.java.icu</code> thnh
    415   <code>android.icu</code>. Nu bn ang s dng gi ICU4J trong ng dng
    416   ca mnh th vic chuyn i sang cc API <code>android.icu</code> c cung cp trong khun kh
    417    Android c th gip lm gim ng k kch thc ca tp APK.
    418 </p>
    419 
    420 <p>
    421    tm hiu thm v API ICU4J trn Android, hy xem <a href="{@docRoot}preview/features/icu4j-framework.html">H tr ICU4J</a>.
    422 </p>
    423 
    424 
    425 
    426 <h2 id="gles_32">API OpenGL&trade; ES 3.2</h2>
    427 
    428 <p>Android N b sung cc giao din khun kh v h tr nn tng cho OpenGL ES 3.2, bao gm:</p>
    429 
    430 <ul>
    431   <li> Mi phn m rng trong <a class="external-link" href="https://www.khronos.org/registry/gles/extensions/ANDROID/ANDROID_extension_pack_es31a.txt">Gi Tin ch m rng Android</a></a> (AEP) ngoi tr <code>EXT_texture_sRGB_decode</code>
    432   <li> B m khung hnh du chm ng cho HDR v to bng tr hon.
    433   <li> Cc lnh v BaseVertex cho php chia gi v truyn pht hiu qu hn.
    434   <li> Kim sot truy cp b m mnh m  gim ph tn qun l ca WebGL.
    435 </ul>
    436 
    437 <p>API khun kh cho OpenGL ES 3.2 trn Android N c cung cp vi lp
    438 <code>GLES32</code>. Khi s dng OpenGL ES 3.2, hy m bo khai bo
    439 yu cu trong tp bn k khai ca bn bng th <code>&lt;uses-feature&gt;</code> v
    440 thuc tnh <code>android:glEsVersion</code>. </p>
    441 
    442 <p> bit thng tin v s dng OpenGL ES, bao gm cch kim tra phin bn
    443  OpenGL ES c h tr ca thit b ti thi gian chy, hy xem mc <a href="{@docRoot}guide/topics/graphics/opengl.html">Hng dn API OpenGL ES</a>.</p>
    444 
    445 
    446 <h2 id="android_tv_recording">Ghi li trn Android TV</h2>
    447 
    448 <p>Android N b sung kh nng ghi v pht li ni dung t cc dch v
    449 ngun vo ca Android TV thng qua cc API ghi li. c xy dng da trn cc API
    450 chuyn dch thi gian sn c, cc dch v ngun vo TV c th kim sot d liu ca knh no c php ghi li, cch thc
    451 lu tr cc phin c ghi li cng nh qun l tng tc ca ngi dng vi ni dung ghi li. </p>
    452 
    453 <p> bit thm thng tin, hy xem <a href="{@docRoot}preview/features/tv-recording-api.html">API ghi li ca Android TV</a>.</p>
    454 
    455 
    456 <h2 id="android_for_work">Android cho Cng vic</h2>
    457 
    458 <p>Android cho Cng vic b sung nhiu tnh nng mi v cc API cho thit b chy Android N.
    459 Di y l mt s im ni bt &mdash;  xem danh sch y  cc cp nht ca Android N
    460 lin quan n Android cho Cng vic, vui lng xem Cc thay i ca Android cho Cng vic.</p>
    461 
    462 <h3 id="work_profile_security_challenge">Th thch bo mt cu hnh cng vic </h3>
    463 
    464 <p>
    465   Ngi s hu cu hnh c th ch nh mt th thch bo mt ring cho cc ng dng ang chy trong
    466   cu hnh cng vic. Th thch cng vic c hin th khi ngi dng c gng m
    467   bt k ng dng cng vic no. Hon tt thnh cng th thch bo mt s m kha
    468   cu hnh cng vic v gii m n nu cn. i vi ngi s hu cu hnh,
    469   <code>ACTION_SET_NEW_PASSWORD</code> s yu cu ngi dng t mt th thch
    470   cng vic v <code>ACTION_SET_NEW_PARENT_PROFILE_PASSWORD</code> s yu cu
    471   ngi dng t kha thit b.
    472 </p>
    473 
    474 <p>
    475   Ngi s hu cu hnh c th t cc chnh sch mt khu ring bit cho th thch cng vic
    476   (nh  di m PIN cn thit hoc c th s dng du vn tay
    477     m kha cu hnh hay khng) bng <code>setPasswordQuality()</code>,
    478  <code>setPasswordMinimumLength()</code> v cc phng thc lin quan. Ngi s hu
    479   cu hnh cng c th ci kha thit b bng thc th <code>DevicePolicyManager</code>
    480  c tr v bi phng thc <code>getParentProfileInstance()</code> mi.
    481   Ngoi ra, ngi s hu cu hnh c th ty chnh mn hnh xc thc thng tin cho
    482   th thch cng vic bng cc phng thc <code>setOrganizationColor()</code> v
    483    <code>setOrganizationName()</code> mi.
    484 </p>
    485 <h3 id="turn_off_work">Tt cng vic </h3>
    486 
    487 <p>Trn mt thit b c cu hnh cng vic, ngi dng c th bt hoc tt ch  cng vic. Khi ch  cng vic c
    488 tt ngi dng c qun l s tm thi b tt, khin v hiu ha cc ng dng
    489 cu hnh cng vic, ng b chy ngm v cc thng bo. iu ny bao gm c ng dng
    490 ca ngi s hu cu hnh. Khi ch  cng vic b tt, h thng s hin th biu tng
    491 trng thi lin tc  nhc ngi dng  rng h khng th khi chy cc ng dng cng vic. Trnh khi chy
    492 s ch bo rng cc ng dng v widget cng vic khng kh dng. </p>
    493 
    494 <h3 id="always_on_vpn">VPN lun bt </h3>
    495 
    496 <p>Ngi s hu thit b v ngi s hu cu hnh c th m bo rng nhng ng dng cng vic lun kt ni
    497 thng qua mt VPN ch nh. H thng s t ng khi ng VPN  sau khi
    498 thit b khi ng.</p>
    499 
    500 <p>
    501   Cc phng thc <code>DevicePolicyManager</code> mi gm
    502   <code>setAlwaysOnVpnPackage()</code> v
    503   <code>getAlwaysOnVpnPackage()</code>.
    504 </p>
    505 
    506 <p>Do cc dch v VPN c th c gn kt trc tip bi h thng m khng cn tng tc
    507 ca ng dng, cc my khch VPN cn x l cc im bt u cho VPN lun bt. Ging
    508 trc y, cc dch v c ch nh ti h thng bng mt b lc  nh ph hp vi
    509 hnh ng <code>android.net.VpnService</code>. </p>
    510 
    511 <p>
    512   Ngi dng cng c th t th cng cc my khch VPN lun bt c ci t cc phng thc
    513    <code>VPNService</code> trong ngi dng chnh bng
    514   <strong>Settings&gt;More&gt;Vpn</strong>.
    515 </p>
    516 
    517 <h2 id="accessibility_enhancements">Ci tin tr nng</h2>
    518 
    519 <p>Android N nay  h tr Ci t Kh nng nhn trc tip trn mn hnh Cho mng khi thit lp
    520 thit b mi. iu ny gip ngi dng rt d dng khm ph v cu hnh
    521 cc tnh nng tr nng trn thit b ca h, bao gm c ch phng i, c
    522 phng ch, kch thc hin th v TalkBack. </p>
    523 
    524 <p>Vi cc tnh nng tr nng c b tr ngy cng d thy hn, khi c bt
    525 kh nng ngi dng s th ng dng ca bn s cao hn. Hy m bo bn kim th ng dng ca mnh
    526 trc vi cc ci t ny c bt. Bn c th bt chng trong Settings &gt;
    527 Accessibility.</p>
    528 
    529 <p>Ngoi ra, trong Android N, cc dch v tr nng  c th tr gip ngi dng b cc tn thng
    530 vn ng chm vo mn hnh. API mi cho php xy dng cc dch v vi nhng
    531 tnh nng nh theo di chuyn ng ca khun mt, theo di chuyn ng ca mt, qut im, v.v. nhm
    532 p ng nhu cu nhng ngi dng ny.</p>
    533 
    534 <p> bit thm thng tin, hy xem <code>android.accessibilityservice.GestureDescription</code>
    535 	  trong ti liu <a href="{@docRoot}preview/setup-sdk.html#docs-dl">Tham kho API</a> c th ti xung.</p>
    536 
    537 
    538 <h2 id="direct_boot">Khi ng Trc tip</h2>
    539 
    540 <p>Khi ng Trc tip ci thin thi gian khi ng ca thit b v cho php cc ng dng
    541  ng k c chc nng hn ch ngay c sau khi khi ng li ngoi d kin.
    542 V d, nu mt thit b c m ha khi ng li khi ngi dng ang ng th
    543 bo thc, tin nhn v cc cuc gi n  ng k c th tip tc thng bo
    544 cho ngi dng nh thng l. iu ny cng c ngha l cc dch v tr nng cng s
    545    kh dng ngay sau khi khi ng xong.</p>
    546 
    547 <p>Khi ng Trc tip s dng m ha theo tp trong Android N
    548  bt cc chnh sch m ha chi tit cho c d liu ca h thng v ng dng.
    549 H thng s s dng mt b lu tr m ha thit b cho d liu h thng c chn v d liu ng dng
    550  ng k cng khai. Theo mc nh, mt b lu tr m ha thng tin xc thc s c s dng cho mi
    551    d liu h thng, d liu ngi dng, ng dng v d liu ca ng dng khc. </p>
    552 
    553 <p>Trong qu trnh khi ng, h thng s khi ng vo ch  hn ch v ch c quyn truy cp ti
    554 d liu m ha thit b m thi, v khng c quyn truy cp thng thng ti ng dng hoc d liu.
    555 Nu bn c cc thnh phn mun chy trong ch  ny th bn c th ng k
    556 chng bng cch t c trong bn k khai. Sau khi khi ng, h thng s kch hot
    557 cc thnh phn  ng k bng cch truyn pht  nh <code>LOCKED_BOOT_COMPLETED</code>
    558 . H thng s m bo cho d liu m ha thit b  ng k s kh dng
    559 trc khi m kha. Mi d liu khc s khng kh dng cho ti khi Ngi dng xc nhn thng tin xc thc trn mn hnh kha
    560    ca h  gii m n. </p>
    561 
    562  bit thm thng tin, hy xem <a href="{@docRoot}preview/features/direct-boot.html">Khi ng Trc tip</a>.</p>
    563 </p>
    564 
    565 
    566 <h2 id="key_attestation">Chng thc kha</h2>
    567 
    568 <p>Cc b lu tr kha da trn phn cng cung cp mt phng thc an ton hn rt nhiu  to, lu tr,
    569 v s dng cc kha mt m trn thit b Android. Chng bo v cc kha trc
    570 nhn Linux, trc cc l hng bo mt tim tng ca Android v trc vic trch xut
    571 t cc my b ginh quyn iu khin v b can thip vo cc tp h thng (my b root).</p>
    572 
    573 <p>Android N  a ra tnh nng Chng thc kha  s dng cc b lu tr kha da trn phn cng mt cch
    574  d dng v bo mt hn. Cc ng dng v dch v khng thuc thit b c th s dng Chng thc
    575 kha  xc nh chc chn xem mt cp kha RSA hoc EC c
    576 da trn phn cng hay khng, cc c im ca cp kha  l g v
    577   cc rng buc no c p dng cho vic s dng v tnh hp l ca cp kha . </p>
    578 
    579 <p>Cc ng dng v dch v khng thuc thit b c th yu cu thng tin v mt cp kha
    580 thng qua chng ch chng thc X.509. Chng ch ny phi c k bi mt kha
    581 chng thc hp l. Kha chng thc l mt kha k ECDSA, c
    582 a vo b lu tr kha da trn phn cng ca thit b ti nh my.
    583 Do , mt chng ch chng thc c k bi kha
    584 chng thc hp l s xc nhn s tn ti ca b lu tr kha da trn phn cng, km theo
    585    chi tit v cc cp kha trong b lu tr kha .</p>
    586 
    587 <p> chc chn thit b ang s dng nh
    588 Android bo mt, chnh thc t nh my, Chng thc kha yu cu <a class="external-link" href="https://source.android.com/security/verifiedboot/verified-boot.html#bootloader_requirements">bootloader</a>
    589  ca thit b cung cp thng tin sau cho <a class="external-link" href="https://source.android.com/security/trusty/index.html">Mi trng Thc thi
    590   An ton (TEE)</a>:</p>
    591 
    592 <ul>
    593 <li>Phin bn HH v cp v li c ci t trn thit b</li>
    594 <li>Kha cng khai <a href="https://source.android.com/security/verifiedboot/index.html" class="external-link">Khi ng c xc thc</a> v trng thi kha</li>
    595   </ul>
    596 
    597 <p> bit thm thng tin v tnh nng b lu tr kha da trn phn cng,
    598 hy xem hng dn <a href="https://source.android.com/security/keystore/" class="external-link">B lu tr kha da trn phn cng</a>.</p>
    599 
    600 <p>Ngoi Chng thc kha, Android N cng gii thiu
    601    cc kha da vo vn tay m khng c thu hi khi ng k vn tay.</p>
    602 
    603 <h2 id="network_security_config">Cu hnh Bo mt mng</h2>
    604 
    605 <p>Trong Android N, cc ng dng c th ty bin hnh vi ca cc kt ni
    606 bo mt (HTTPS, TLS) ca chng mt cch an ton m khng cn chnh sa m nh s dng khai bo
    607 <em>Cu hnh Bo mt mng</em> thay v s dng cc API lp trnh truyn thng
    608 d xy ra li (vd: X509TrustManager).</p>
    609 
    610   <p>Cc tnh nng c h tr:</p>
    611 <ul>
    612 <li><b>Ngun tin cy ty chnh.</b> Cho php mt ng dng ty chnh
    613 Nh cung cp chng ch (CA) no s c tin cy cho cc kt ni bo mt ca ng dng. V
    614 d, tin cy cc chng ch t k c th hoc mt b gii hn cc CA cng khai.
    615 </li>
    616 <li><b>Ch khng ch khi g li.</b> Cho php nh pht trin ng dng an ton g li
    617 cc kt ni bo mt ca ng dng m khng to thm ri ro cho phn c s
    618  ci t.
    619 </li>
    620 <li><b>Khng s dng truyn gi vn bn cha m ha.</b> Cho php mt ng dng t bo v mnh khi vic
    621 v tnh s dng truyn gi vn bn cha m ha cleartext.</li>
    622 <li><b>Ghim chng ch.</b> Mt tnh nng nng cao cho php mt ng dng
    623   gii hn cc kha my ch no l an ton i vi cc kt ni bo mt.</li>
    624 </ul>
    625 
    626 <p> bit thm thng tin, hy xem <a href="{@docRoot}preview/features/security-config.html">Cu hnh Bo mt
    627  mng</a>.</p>
    628 
    629 <h2 id="default_trusted_ca">Nh cung cp Chng ch An ton mc nh</h2>
    630 
    631 <p>Theo mc nh, cc ng dng nhm mc tiu Android N ch tin cy cc chng ch do h thng cp
    632 v khng cn tin cy cc Nh cung cp chng ch (CA) do ngi dng thm vo. Cc ng dng nhm mc tiu Android
    633 N mun tin cy cc CA do ngi dng thm vo nn s dng
    634 <a href="{@docRoot}preview/features/security-config.html">Cu hnh Bo mt mng</a> 
    635 ch nh cch thc tin cy cc CA ca ngi dng.</p>
    636 
    637 <h2 id="apk_signature_v2">Lc  ch k s v2 cho tp APK</h2>
    638 
    639 <p>Lp PackageManager nay  h tr xc thc ng dng bng Lc  ch k s v2
    640 APK. Lc  ch k s v2 APK l mt lc  ch k s trn ton b tp
    641 lm tng ng k tc  xc thc v tng cng s bo m
    642    ton vn bng cch pht hin cc thay i tri php i vi cc tp APK.</p>
    643 
    644 <p> bo m tng thch ngc, mt tp APK phi c k bng lc 
    645 ch k s v1 (Lc  ch k s JAR) trc khi c k bng lc  ch k s v2.
    646 Vi lc  ch k s v2, qu trnh xc thc s tht bi nu bn k tp APK bng mt
    647   chng ch khc sau khi k bng lc  v2. </p>
    648 
    649 <p>H tr cho lc  ch k s v2 cho tp AKP s c sau trong N Developer
    650 Preview.</p>
    651 
    652 <h2 id="scoped_directory_access">Truy cp th mc theo phm vi</h2>
    653 
    654 <p>Trong Android N, ng dng c th s dng cc API mi  yu cu truy cp vo cc th mc <a href="{@docRoot}guide/topics/data/data-storage.html#filesExternal">b nh lu tr
    655 ngoi</a> ring, bao gm cc th mc trn phng tin c th tho ra nh th
    656 SD. Cc API mi  ti gin cch thc ng dng ca bn truy cp cc th mc lu tr ngoi
    657 tiu chun nh th mc <code>Pictures</code>. Cc ng dng
    658 nh ng dng qun l nh c th s dng cc API ny thay v s dng
    659 <code>READ_EXTERNAL_STORAGE</code>  cp quyn truy cp ti mi th mc
    660 lu tr, hoc Khun kh Truy cp Lu tr  gip ngi dng di chuyn ti
    661 th mc .</p>
    662 
    663 <p>Ngoi ra, cc API mi ny cng n gin ha cc bc m ngi dng thc hin  cp quyn truy cp
    664 b nh lu tr ngoi cho ng dng ca bn. Khi bn s dng cc API mi, h thng s s dng mt UI cp quyn
    665 n gin cung cp cc thng tin chi tit r rng v th mc no ng dng ang
    666 yu cu quyn truy cp.</p>
    667 
    668 <p> bit thm thng tin, hy xem ti liu cho nh pht trin
    669 <a href="{@docRoot}preview/features/scoped-folder-access.html">Truy cp
    670 Th mc theo Phm vi</a>.</p>
    671 
    672 
    673 
    674 
    675 
    676 
    677