I'm trying to select an image to transfer to the server. I use ContentChooser as in the example:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
On the first try, the application does not reach the CC_Result subroutine! None of the messages are displayed! Then, every time I try, it works perfectly. After closing the application (or reinstall it) and reopening it, it behaves identically: on the first try it doesn't work, then it works every time. What am I not doing well?
			
			
			
				B4X:
			
		
		
		Sub PanelBrowse_Click
    PhotoLoaded = False
    Dim CC As ContentChooser
    CC.Initialize("CC")
    CC.Show("image/*", "Select an image!")  
End Sub
Sub CC_Result(Success As Boolean, Dir As String, FileName As String)
    If Success Then
       Msgbox2Async("Image " & FileName & " was selected!","Atentie!","Ok","","",LoadBitmap(File.DirAssets,"exclamation.png"),False)
        File.Copy(Dir, FileName, File.DirInternal, "sesizare.jpg")                      
        ImageViewPoza.Bitmap = LoadBitmap(Dir, FileName)
        PhotoLoaded = True
    Else
        Msgbox2Async("No image was selected!","Atenttion!","Ok","","",LoadBitmap(File.DirAssets,"exclamation.png"),False)
    End If
End SubOn the first try, the application does not reach the CC_Result subroutine! None of the messages are displayed! Then, every time I try, it works perfectly. After closing the application (or reinstall it) and reopening it, it behaves identically: on the first try it doesn't work, then it works every time. What am I not doing well?
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
				 
 
		 
 
		 
 
		 
 
		 
 
		