Xamarin Android Produced Bundle showing ... - Microsoft Docs

文章推薦指數: 80 %
投票人數:10人

permission.ACCESS_BACKGROUND_LOCATION, but not asked for in AndroidManifest.xml. I am using Xamarin Forms to produce a cross platform app. I am ... Home Anonymous Signintopost Post Explore Tags Questions Sitefeedback Articles Users Skiptomaincontent Findthreads,tags,andusers... SearchSearch Explore Tags Questions Sitefeedback Articles Users Signintopost Home question Clicktovote 0Votes"0 Clicktodownvote TonyPitman-4374 asked • Feb7,'22 | JarvanZhang-MSFT edited • Feb23,'22 XamarinAndroidProducedBundleshowingandroid.permission.ACCESS_BACKGROUND_LOCATION,butnotaskedforinAndroidManifest.xml IamusingXamarinFormstoproduceacrossplatformapp.IamusingthelatestVisualStudio2019forMac.WhenIsubmitmyapptothegoogleplaystoretheykeepsayingthatIneedamessagetellingtheuserwhyIneedbackgroundlocationservices.ThisisconfusingtomebecauseinmycodeIusethisrequest: Permissions.RequestAsync OntopofthatwhenIlookattheoptionsonthepermissionspagetheAccessBackgroundLocationcheckboxisNOTchecked. HereiswhatisinmyAndroidManifest.xml: YetwhenIlookattheAppBundleonthegoogleplaywebsiteforthisapphereiswhatIsee: Requiredpermissions(12) 12COMMON android.permission.ACCESS_BACKGROUND_LOCATION,android.permission.ACCESS_COARSE_LOCATION,android.permission.ACCESS_FINE_LOCATION,android.permission.ACCESS_NETWORK_STATE,android.permission.BATTERY_STATS,android.permission.BLUETOOTH,android.permission.BLUETOOTH_ADMIN,android.permission.BLUETOOTH_PRIVILEGED,android.permission.INTERNET,android.permission.READ_EXTERNAL_STORAGE,android.permission.RECEIVE_BOOT_COMPLETED,android.permission.WRITE_EXTERNAL_STORAGE Idon'tunderstandwheretherequirementforACCESS_BACKGROUND_LOCATIONiscomingfromandhowtoturnthatoffinXamarinwhenIbuild. dotnet-xamarin Comment Comment· Show 6 Comment 5|1600charactersneededcharactersleftcharactersexceeded ▼ Visibletoallusers Visibletotheoriginalposter&Microsoft Viewablebymoderators Viewablebymoderatorsandtheoriginalposter Advancedvisibility ToggleCommentvisibility.CurrentVisibility:Visibletoallusers Attachments:Upto10attachments(includingimages)canbeusedwithamaximumof3.0MiBeachand30.0MiBtotal. JarvanZhang-MSFT ·Feb09at05:18AM Hi,TonyPitman-4374.Whatisthetargetframeworkofyourproject?IftheprojecttargetsAndroid9orlower,theACCESS_BACKGROUND_LOCATIONwillbeaddedautomaticallyinthefollowingsituations: IfyourappdeclaresaelementforeitherACCESS_FINE_LOCATIONorACCESS_COARSE_LOCATION,thesystemautomaticallyaddsaelementforACCESS_BACKGROUND_LOCATIONduringinstallation. IfyourapprequestseitherACCESS_FINE_LOCATIONorACCESS_COARSE_LOCATION,thesystemautomaticallyaddsACCESS_BACKGROUND_LOCATIONtotherequest. Hereistherelateddoc,youcouldrefertoit:https://developer.android.com/about/versions/10/privacy/changes#access_granted_automatically_when_targeting_android_9_or_lower 0Votes0 · TonyPitman-4374 JarvanZhang-MSFT ·Feb09at05:28AM Thatbeingthecase,whatifIdon’tneedlocationinthebackground?Whatisthecorrectwaytotellthesystemnottoincludeit?GooglewantsmetotelltheuserwhyIuselocationinthebackground,butIdon’tsoIdon’twantthisincluded. 0Votes0 · JarvanZhang-MSFT TonyPitman-4374 ·Feb09at07:55AM Doesyourappaccessthelocationinbackground?Anappisconsideredtobeaccessinglocationinthebackgroundunlessoneofthefollowingconditionsissatisfied: Anactivitybelongingtotheappisvisible. Theappisrunningaforegroundservicethathasdeclaredaforegroundservicetypeoflocation. Ifyourappcreatesandmonitorsgeofences,youmustdeclaretheACCESS_BACKGROUND_LOCATIONpermission. 0Votes0 · Showmorecomments JarvanZhang-MSFT ·Feb10at08:27AM TryaddingthefollowingcodeinAndroidManifest.xmlfile. Hereisasimialrthreadyoucouldrefertoit:https://stackoverflow.com/a/65620779/11083277 0Votes0 · TonyPitman-4374 JarvanZhang-MSFT ·Feb10at03:55PM Thisworks.PleasepostasananswersoIcanmarkitastheanswer.Thankyou! 0Votes0 · 1Answer Clicktovote 0Votes"0 Clicktodownvote JarvanZhang-MSFT answered • Feb11,'22 | JarvanZhang-MSFT edited • Feb23,'22 Hello@TonyPitman-4374,​ WelcometoourMicrosoftQ&Aplatform! WhentargetingAndroid.9andlower,ACCESS_FINE_LOCATIONandACCESS_COARSE_LOCATIONimplyACCESS_BACKGROUND_LOCATION.SoifyouwanttoremovetheACCESS_BACKGROUND_LOCATIONpermission,thenyoucannotrequestACCESS_FINE_LOCATIONorACCESS_COARSE_LOCATIONpermissioninyourapplication. ForhowtoremovetheACCESS_BACKGROUND_LOCATIONpermission,pleaseaddtools:node="remove"totheuses-permissiontagasbelow: BestRegards, JarvanZhang Iftheresponseishelpful,pleaseclick"AcceptAnswer"andkindlyupvoteit.Ifyouhaveextraquestionsaboutthisanswer,pleaseclick"Comment". Note:Pleasefollowthestepsinourdocumentationtoenablee-mailnotificationsifyouwanttoreceivetherelatedemailnotificationforthisthread. Comment Comment Show 0 Comment 5|1600charactersneededcharactersleftcharactersexceeded ▼ Visibletoallusers Visibletotheoriginalposter&Microsoft Viewablebymoderators Viewablebymoderatorsandtheoriginalposter Advancedvisibility ToggleCommentvisibility.CurrentVisibility:Visibletoallusers Attachments:Upto10attachments(includingimages)canbeusedwithamaximumof3.0MiBeachand30.0MiBtotal. questiondetails 7peoplearefollowingthisquestion. AnswersSubscribetoAnswers AnswersandCommentsSubscribetoCommentsandAnswers RelatedQuestions HowdoImakethelastelementintheforeground(top)inCollectionView FirebaseGoogleAnalyticsinXamarinforms FacingBuildissue PlayingthelivefeedusingWebViewinXamarin XamarinWebviewURLnotopeningnativeapps About · FAQ · Privacy · Copyright©2010-22DZone,Inc.



請為這篇文章評分?