pjrebordao
Member
I'm building an app where where I want to send an email (using the default mail app) with an attachment. For test purposes I'm using the code
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
When running I get an error starting with:
android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.smft.shaknspin/files/SHK2021.07.21_11%3A00%3A28.CSV exposed beyond app through ClipData.Item.getUri()
I suspect there must be some permission I must enable first ?
Thanks
			
			
			
				B4X:
			
		
		
		    Recipient = "[email protected]"
    Message.To.Add(Recipient)
    Message.Subject = "subject"
    Message.Attachments.Add(File.Combine(SaveFolder, input.Text & ".CSV"))
    StartActivity(Message.GetIntent)
	When running I get an error starting with:
android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.smft.shaknspin/files/SHK2021.07.21_11%3A00%3A28.CSV exposed beyond app through ClipData.Item.getUri()
I suspect there must be some permission I must enable first ?
Thanks