Android 6 Essentials

Click here to load reader

  • date post

    26-Jan-2016
  • Category

    Documents

  • view

    49
  • download

    6

Embed Size (px)

description

descriptions a

Transcript of Android 6 Essentials

  • Android6Essentials

  • TableofContents

    Android6Essentials

    Credits

    AbouttheAuthor

    Acknowledgments

    AbouttheReviewer

    www.PacktPub.com

    Supportfiles,eBooks,discountoffers,andmore

    Whysubscribe?

    FreeaccessforPacktaccountholders

    Preface

    Whatthisbookcovers

    Whatyouneedforthisbook

    Whothisbookisfor

    Conventions

    Readerfeedback

    Customersupport

    Downloadingtheexamplecode

    Downloadingthecolorimagesofthisbook

    Errata

    Piracy

    Questions

    1.AndroidMarshmallowPermissions

    AnoverviewofAndroidpermissions

    Permissions

    Permissiongroupdefinitions

    Permissionsthatimplyfeaturerequirements

    Viewingthepermissionsforeachapp

    UnderstandingAndroidMarshmallowpermissions

    Anoverview

  • Permissiongroups

    Runtimepermissions

    Takingcodingpermissionsintoaccount

    Testingpermissions

    Codingforruntimepermissions

    Bestpracticesandusagenotes

    Minimalismisagreatoption

    Askingfortoomanypermissionsatonce

    Honestycanbeagreatpolicy

    Needsupporthandlingruntimepermissions?

    Somepermissionsarenormalandsafertouse

    Summary

    2.AppLinks

    TheAndroidIntentsystem

    Creatingawebsiteassociation

    Whythisfile?

    Triggeringapplinkverification

    Applinksettingsandmanagement

    Testingapplinks

    Checkingmanifestandlistingdomains

    TheDigitalAssetLinksAPI

    Testingourintent

    Checkingpoliciesusingadb

    Summary

    3.AppsAutoBackup

    Anoverview

    Databackupconfiguration

    Includingorexcludingdata

    Thebackupconfigurationsyntax

    Optingoutfromappdatabackup

    Backupconfigurationtesting

  • Settingbackuplogs

    Testingthebackupphase

    Testingtherestorephase

    Troubleshooting

    Importantbytes

    Whattoexcludefromthebackup

    BackupAgentandbackupevents

    Summary

    4.ChangesUnfold

    Power-savingmodes

    TheDozemode

    Whathappenstoappswhenadeviceisdozing?

    TestingappswithDozemode

    TheAppStandbymode

    WhathappenstoappswhenintheAppStandbymode?

    TestingappswiththeAppStandbymode

    Excludedappsandsettings

    Tips

    Removablestorageadoption

    ApacheHTTPclientremoval

    Notifications

    Textselection

    Supportlibrarynotice

    AndroidKeystorechanges

    Wi-Fiandnetworkingchanges

    Runtime

    Hardwareidentifier

    APKvalidation

    USBconnection

    DirectShare

    Whatifwehavenothingtoshare?

  • DirectSharebestpractices

    Voiceinteractions

    TheAssistAPI

    BluetoothAPIChanges

    Bluetoothstylussupport

    ImprovedBluetoothlowenergyscanning

    Summary

    5.Audio,Video,andCameraFeatures

    Audiofeatures

    SupportfortheMIDIprotocol

    MidiManager

    Digitalaudiocaptureandplayback

    Audioandinputdevices

    Informationonaudiodevices

    ChangesinAudioManager

    Videofeatures

    android.media.MediaSync

    MediaCodecInfo.CodecCapabilities.getMaxSupportedInstances

    Whydoweneedtoknowthis?

    MediaPlayer.setPlaybackParams

    Camerafeatures

    TheflashlightAPI

    ThereprocessingAPI

    android.media.ImageWriter

    android.media.ImageReader

    Changesinthecameraservice

    Summary

    6.AndroidforWork

    Behavioralchanges

    Theworkprofilecontactsdisplayoption

    Wi-Ficonfigurationoptions

  • TheWi-Ficonfigurationlock

    WorkPolicyControlleraddition

    DevicePolicyManagerchanges

    Single-usedeviceimprovements

    Silentlyinstalling/uninstallingapps

    Improvedcertificateaccess

    Automaticsystemupdates

    Third-partycertificateinstallation

    Datausagestatistics

    Managingruntimepermissions

    VPNaccessanddisplay

    Workprofilestatus

    Summary

    7.ChromeCustomTabs

    WhatisaChromecustomtab?

    WhatisWebView?

    Customizationoptions

    WhentouseChromecustomtabs

    Theimplementationguide

    CanweuseChromecustomtabs?

    CustomUIandtabinteraction

    Thecustomactionbutton

    Configuringacustommenu

    Configuringcustomenterandexitanimations

    Chromewarm-up

    ConnectingtotheChromeservice

    Warmingupthebrowserprocess

    Creatinganewtabsession

    SettingtheprefetchingURL

    Customtabsconnectioncallback

    Summary

  • 8.Authentication

    TheFingerprintauthenticationAPI

    Howdoweusefingerprintauthentication?

    Settingupfortesting

    CredentialsGracePeriod

    Cleartextnetworktraffic

    So,whatdowedowiththecleartextnetworktrafficflag?

    Summary

    Index

  • Android6Essentials

  • Android6EssentialsCopyright2015PacktPublishing

    Allrightsreserved.Nopartofthisbookmaybereproduced,storedinaretrievalsystem,ortransmittedinanyformorbyanymeans,withoutthepriorwrittenpermissionofthepublisher,exceptinthecaseofbriefquotationsembeddedincriticalarticlesorreviews.

    Everyefforthasbeenmadeinthepreparationofthisbooktoensuretheaccuracyoftheinformationpresented.However,theinformationcontainedinthisbookissoldwithoutwarranty,eitherexpressorimplied.Neithertheauthor,norPacktPublishing,anditsdealersanddistributorswillbeheldliableforanydamagescausedorallegedtobecauseddirectlyorindirectlybythisbook.

    PacktPublishinghasendeavoredtoprovidetrademarkinformationaboutallofthecompaniesandproductsmentionedinthisbookbytheappropriateuseofcapitals.However,PacktPublishingcannotguaranteetheaccuracyofthisinformation.

    Firstpublished:November2015

    Productionreference:1251115

    PublishedbyPacktPublishingLtd.

    LiveryPlace

    35LiveryStreet

    BirminghamB32PB,UK.

    ISBN978-1-78588-441-2

    www.packtpub.com

  • CreditsAuthor

    YossiElkrief

    Reviewer

    PavelPavlasek

    CommissioningEditor

    EdwardGordon

    AcquisitionEditor

    ReshmaRaman

    ContentDevelopmentEditor

    RiddhiTuljapurkar

    TechnicalEditor

    GauravSuri

    CopyEditor

    StutiSrivastava

    ProjectCoordinator

    SanchitaMandal

    Proofreader

    SafisEditing

    Indexer

    HemanginiBari

    Graphics

    KirkDPenha

    DishaHaria

    AbhinashSahu

    ProductionCoordinator

    AparnaBhagat

    CoverWork

    AparnaBhagat

  • AbouttheAuthorYossiElkriefisanAndroidenthusiastwithover7yearsofexperienceintheAndroidplatformandiscurrentlyworkingasanAndroidarchitectandgroupleaderatTikalKnowledge.

    Amonghispreviousexperiences,thenoteworthyonesincludeooVoo,Fiverr,Mobli,andGlide,reachingouttoover135millionusersworldwide.

    YossiisamentoratGoogleLaunchpad,alectureronIoTandmobiledevelopment,andco-techleadontheMadgeraaccelerator.HecofoundedtheGDGBeerShevagroupandco-leadsthegrouptoday,holdingtechnologyeventsforthetechnologycommunityinIsrael.Hehasaspouseandadaughter,andhelivesinBeerSheva,Israel.

    HismaininterestsareLiverpoolFootballClubandhisAndroidminicollectiblescollection,withover120differentpieces.YoucanfindhimonLinkedInathttps://il.linkedin.com/in/yossielkrief,onGitHubatMaTriXy,andonGoogle+atYossi.Elkrief.

  • AcknowledgmentsFirst,Iwanttothankmyfamilyfortheirpatience,love,andendurancewithmetakingyetanotherchallenge,reducingtheamountoftimeIcanspendwiththem.

    ToIrit,mywife,fortheconstantloveandsupportandrememberingtofeedmewhenIcouldntremembertofeedmyself.

    ToMia,mydaughterIloveyou.

    Tomymotherandfather,whomIloveandcherish.

    Tomyfriends,forbeingtherewiththeircodingarmoronandforgivingmethechancetoshine.

    Tomymentor,friend,andfamily,IsraelMali;thankyouforguidingmefor15years,helpingmecarvemycareerpath.Mayyourestinpeace.

    IwanttothankPacktPublishingforthisopportunityandforpublishingmyfirstbook.AspecialthankstoRiddhiTuljapurkarforallthehelpandguidance.

    Lastbutnotleast,IchallengeyoutotryouttheChubbyBunnychallengeathttp://icebreakerideas.com/chubby-bunny-challenge/.

  • AbouttheReviewerPavelPavlasekhasbeenanAndroiddeveloperforover5years,apartfrombeingalong-timeJavadeveloper.HedevelopswebinformationsystemsandAndroidapplications,andheispassionateaboutnewtechnologies.

    Iwouldliketothanktomyfamilyfortheirsupportandinspirationmywife,Daniela,andmychildren,Michaela,Jakub,andJuraj.IwouldalsoliketothankmycolleaguesandotherAndroiddevelopersIvemet.

  • www.PacktPub.com

  • Supportfiles,eBooks,discountoffers,andmoreForsupportfilesanddownloadsrelatedtoyourbook,pleasevisitwww.PacktPub.com.

    DidyouknowthatPacktofferseBookversionsofeverybookpublished,withPDFandePubfilesavailable?YoucanupgradetotheeBookversionatwww.PacktPub.comandasaprintbookcustomer,youareentitledtoadiscountontheeBookcopy.Getintouchwithusatformoredetails.

    Atwww.PacktPub.com,youcanalsoreadacollectionoffreetechnicalarticles,signupforarangeoffreenewslettersandreceiveexclusivediscountsandoffersonPacktbooksandeBooks.

    https://www2.packtpub.com/books/subscription/packtlib

    DoyouneedinstantsolutionstoyourITquestions?PacktLibisPacktsonlinedigitalbooklibrary.Here,youcansearch,access,andreadPacktsentirelibraryofbooks.

  • Whysubscribe?FullysearchableacrosseverybookpublishedbyPacktCopyandpaste,print,andbookmarkcontentOndemandandaccessibleviaawebbrowser

  • FreeaccessforPacktaccountholdersIfyouhaveanaccountwithPacktatwww.PacktPub.com,youcanusethistoaccessPacktLibtodayandview9entirelyfreebooks.Simplyuseyourlogincredentialsforimmediateaccess.

  • PrefaceAndroid6willprimarilyfocusonimprovingtheoveralluserexperience,anditwillbringinafewfeatures,suchasaredesignedpermissionmodelinwhichapplicationsarenolongerautomaticallygrantedalloftheirspecifiedpermissionsatthetimeofinstallation,theDozepowerschemeforextendedbatterylifewhenadeviceisnotmanipulatedbytheuser,andnativesupportforfingerprintrecognition.

    IfyourealreadyanAndroiddeveloper,youreonlyafewstepsawayfrombeingabletouseyourexistingdevelopment