Android Question Mime type

Hlo guys, Happy nu yr 2 u all. Am asking 4 the documents mime type used in d content chooser as u see image, video, audio. Wat can I use 4 documents
 

ProjectGroup19

Active Member
Licensed User
B4X:
Dim Answ As Object
Dim Txt As String
   
 Txt = "Do you really want to attach a file?"
 Answ = Msgbox2Async(Txt, "A T T E N T I O N", "Yes", "", "No",Null,False)   ' MessageBox
 Wait For (Answ) msgbox_result(result As Int)

'Choose Documents Only
If B4XComboBoxSelectType.SelectedIndex=1 Then
        If result = DialogResponse.POSITIVE Then    ' If return value is Yes then
            Starter.FU.Show("application/*","Choose file")
           
        Else
            ToastMessageShow("Nothing Selected",True)
        End If
    End If
   
'Choose Audios Only
    If B4XComboBoxSelectType.SelectedIndex=2 Then
        If result = DialogResponse.POSITIVE Then    ' If return value is Yes then
            Starter.FU.Show("audio/*","Choose file")
           
        Else
            ToastMessageShow("Nothing Selected",True)
        End If
    End If
   
'Choose Images Only
    If B4XComboBoxSelectType.SelectedIndex=3 Then
        If result = DialogResponse.POSITIVE Then    ' If return value is Yes then
            Starter.FU.Show("image/*","Choose file")
           
        Else
            ToastMessageShow("Nothing Selected",True)
        End If
    End If

'Choose Videos Only
    If B4XComboBoxSelectType.SelectedIndex=4 Then
        If result = DialogResponse.POSITIVE Then    ' If return value is Yes then
            Starter.FU.Show("video/*","Choose file")
           
        Else
            ToastMessageShow("Nothing Selected",True)
        End If
    End If

Above is the code I use. I hope it helps you @Wizard Edge
 
Upvote 0
B4X:
Dim Answ As Object
Dim Txt As String
  
 Txt = "Do you really want to attach a file?"
 Answ = Msgbox2Async(Txt, "A T T E N T I O N", "Yes", "", "No",Null,False)   ' MessageBox
 Wait For (Answ) msgbox_result(result As Int)

'Choose Documents Only
If B4XComboBoxSelectType.SelectedIndex=1 Then
        If result = DialogResponse.POSITIVE Then    ' If return value is Yes then
            Starter.FU.Show("application/*","Choose file")
          
        Else
            ToastMessageShow("Nothing Selected",True)
        End If
    End If
  
'Choose Audios Only
    If B4XComboBoxSelectType.SelectedIndex=2 Then
        If result = DialogResponse.POSITIVE Then    ' If return value is Yes then
            Starter.FU.Show("audio/*","Choose file")
          
        Else
            ToastMessageShow("Nothing Selected",True)
        End If
    End If
  
'Choose Images Only
    If B4XComboBoxSelectType.SelectedIndex=3 Then
        If result = DialogResponse.POSITIVE Then    ' If return value is Yes then
            Starter.FU.Show("image/*","Choose file")
          
        Else
            ToastMessageShow("Nothing Selected",True)
        End If
    End If

'Choose Videos Only
    If B4XComboBoxSelectType.SelectedIndex=4 Then
        If result = DialogResponse.POSITIVE Then    ' If return value is Yes then
            Starter.FU.Show("video/*","Choose file")
          
        Else
            ToastMessageShow("Nothing Selected",True)
        End If
    End If

Above is the code I use. I hope it helps you @Wizard Edge
Thanx @ProjectGroup19. It really works fine. Appreciate so much.
 
Upvote 0
Top