Hi All,
I know this question has been asked many times and the answer is always this : Runtime permissions: https://www.b4x.com/search?query=Runtime+permissions .
Well I have read through this several times and am more baffled than before.
My Question:
I have used the following code to copy the "Help File" to external memory where the user can access it for viewing on a PC, printing, etc.
I have used DirRootExternal because that what pops up when I access via a file manager.
The following code in Activity Create has worked well in Target SDK 28 but causes a Permission Denied error when changed to SDK 29.
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The tutorial "Seems" to point me towards using
 
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
leaving me with more questions.
1. Where/What is DirDefaultExternal when you access via a file manager?
2. What I read in the tutorial, implies that additional code is also required in the manifest, or is this an alternative to code in Activity Create.
Is there a simple fix to keep using DirRootExternal or do I need to use DirDefaultExternal with the previous questions in mind?
Thanks in advance.
Regards Roger
			
			I know this question has been asked many times and the answer is always this : Runtime permissions: https://www.b4x.com/search?query=Runtime+permissions .
Well I have read through this several times and am more baffled than before.
My Question:
I have used the following code to copy the "Help File" to external memory where the user can access it for viewing on a PC, printing, etc.
I have used DirRootExternal because that what pops up when I access via a file manager.
The following code in Activity Create has worked well in Target SDK 28 but causes a Permission Denied error when changed to SDK 29.
			
				B4X:
			
		
		
		'Permission to READ/WRITE External Memory
        rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
        Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
        '....  and then
        If Result Then     'The HepFile is copied to an external directory where it can transferred/printed etc.
'Copy Help file to the C_Calc folder
            If File.Exists(File.DirRootExternal&"/C_Calc/", "") = False Then File.MakeDir(File.DirRootExternal&"/C_Calc/", "")
            File.Copy(File.DirAssets,"helpfile.htm",File.DirrootExternal&"/C_Calc/","helpfile.htm")
        End IfThe tutorial "Seems" to point me towards using
			
				B4X:
			
		
		
		RuntimePermissions.GetSafeDirDefaultExternal("")1. Where/What is DirDefaultExternal when you access via a file manager?
2. What I read in the tutorial, implies that additional code is also required in the manifest, or is this an alternative to code in Activity Create.
Is there a simple fix to keep using DirRootExternal or do I need to use DirDefaultExternal with the previous questions in mind?
Thanks in advance.
Regards Roger
 
				 
 
		 
 
		 
						
					 
 
		 
			 
			 
			 
 
		
 
 
		 
 
		 
 
		 
 
		