添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
B4X is a set of simple and powerful cross platform RAD tools:
  • B4A (free) - Android development
  • B4J (free) - Desktop and Server development
  • B4i - iOS development
  • B4R (free) - Arduino, ESP8266 and ESP32 development
  • All developers, with any skill level, are welcome to join the B4X community .

    Android Question ContentChooser - select multiple photos

    I found two topics ( 1 , 2 ) about the choice of several files but didnt found the answer. Can I choose several files using ContentChooser? Here was written about EXTRA_ALLOW_MULTIPLE. Can I add this function to ContentChooser? I need to add 10-15 photos at a time in my app, and it is very long to add them one at a time.
    As you can see in that thread it didn't work with most file explorers.
    You cannot add this flag to ContentChooser. I see. So how can I add several photos using ContentChooser? Could you help me? You can also use other library -> https://www.b4x.com/android/forum/threads/multiphotopicker.82923/ Thank you, this is a very good library, but still not what I wanted. Are there any other similar libraries?
    Is it possible to choose several photos using ContentChooser?
    You can do it vice versa: Make your app able to receive other apps shared content (see the examples). Then the user can select n images from the gallery and press share. Your app can then receive all the images. I did that in one app. Works like a charm.
    https://www.b4x.com/android/forum/t...ple-image-s-shared-to-your-app.91612/#content
    You can do it vice versa: Make your app able to receive other apps shared content (see the examples). Then the user can select n images from the gallery and press share. Your app can then receive all the images. I did that in one app. Works like a charm.
    https://www.b4x.com/android/forum/t...ple-image-s-shared-to-your-app.91612/#content Thank you, but it will not work for me. I have a lot of activities and a lot of CustomListView containing photos ( https://www.b4x.com/android/forum/threads/remove-item-from-customlistview.94079/ ). I need that when I click a button in CustomListView all those photos are loaded.
    Is it even possible to do this with B4A?
    You can send whichever intent you like.
    StartActivityForResult: https://www.b4x.com/android/forum/threads/40374/#content
    ACTION_GET_CONTENT = "android.intent.action.GET_CONTENT"
    EXTRA_ALLOW_MULTIPLE = "android.intent.extra.ALLOW_MULTIPLE"
    #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End Region #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Private ion As Object End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. End Sub Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: Activity.LoadLayout("1") End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub Button1_Click ShowPicker End Sub Sub ShowPicker Dim i As Intent i.Initialize("android.intent.action.GET_CONTENT", "") StartActivityForResult(i) End Sub Sub ion_Event (MethodName As String, Args() As Object) As Object If Args(0) = -1 Then 'resultCode = RESULT_OK Dim i As Intent = Args(1) Dim jo As JavaObject = i Dim uri As String = jo.RunMethod("getParcelableExtra",Array As Object("android.intent.extra.ringtone.PICKED_URI")) Log(uri) End If Return Null End Sub Sub StartActivityForResult(i As Intent) Dim jo As JavaObject = GetBA ion = jo.CreateEvent("anywheresoftware.b4a.IOnActivityResult", "ion", Null) jo.RunMethod("startActivityForResult", Array As Object(ion, i)) End Sub Sub GetBA As Object Dim jo As JavaObject Dim cls As String = Me cls = cls.SubString("class ".Length) jo.InitializeStatic(cls) Return jo.GetField("processBA") End Sub This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies. Accept Learn more…