diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml new file mode 100644 index 00000000..20d17dc3 --- /dev/null +++ b/.github/workflows/gradle-publish.yml @@ -0,0 +1,44 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle + +name: Gradle Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + + - name: Build with Gradle + run: ./gradlew build + + # The USERNAME and TOKEN need to correspond to the credentials environment variables used in + # the publishing section of your build.gradle + - name: Publish to GitHub Packages + run: ./gradlew publish + env: + USERNAME: ${{ github.actor }} + TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 27c2c2d1..8c34ce26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ Change Log ========== +Version 6.0.0 *(2023-12-18)* +---------------------------- + * [Upgrade] Gradle version upgrade completed + * [Fix] Picker crashing on the tablet + * [Fix] Progress bar is not updated until the upload is completed + +Version 5.3.0 *(2018-11-29)* +---------------------------- + + * [Feature] New way to open up the Filestack Picker! Use `FilestackPicker.Builder` class to customize your picker easily. + * [Feature] A way to set Picker's theme is now available. Use `Theme.Builder` class to set your own color scheme to a picker. + * [Feature] Picker's version is now available in the picker's menu. This feature can be disabled using `FilestackPicker.Builder`. + * [UI change] Files descriptions are now formatted in a better way (e.g: 15360 is now properly displayed as 15kB). + * [UI fix] Menu options are now properly hidden in places that doesn't require them. + * Tester module supports all of the new features introduced. Head to Settings to see new configuration options. + Version 5.2.0 *(2018-10-15)* ---------------------------- diff --git a/README.md b/Iphone similarity index 92% rename from README.md rename to Iphone index 982288f8..d3028829 100644 --- a/README.md +++ b/Iphone @@ -3,13 +3,13 @@
-
+
-
-
+
+
@@ -21,7 +21,7 @@ ## Install ```gradle -implementation 'com.filestack:filestack-android:5.1.0' +implementation 'com.filestack:filestack-android:6.0.0' ``` ## Tester and Samples @@ -73,6 +73,7 @@ FilestackPicker picker = new FilestackPicker.Builder() .sources(...) .mimeTypes(...) .multipleFilesSelectionEnabled(...) + .displayVersionInformation(...) .build(); picker.launch(activity); //use an Activity instance to launch a picker @@ -201,6 +202,13 @@ if (savedInstanceState == null) { } ``` +## Theming +Filestack Android SDK provides a theming mechanism for Filestack Picker screen. + +Setting a theme requires passing a `Theme` to `Filestack.Builder#theme(Theme)` method call. +`Theme` objects can be constructed with a `Theme.Builder` instance. +If theme is not set, a default one will be used. + ## Native UI At present this SDK doesn't offer many customization options, but the [Java SDK][java-sdk] can be used to build a native UI. This SDK adds UI and diff --git a/VERSION b/VERSION deleted file mode 100644 index 91ff5727..00000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.2.0 diff --git a/build.gradle b/build.gradle index 3200257b..ec552256 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.71' + ext.kotlin_version = '1.6.21' repositories { jcenter() google() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/docs/allclasses-frame.html b/docs/allclasses-frame.html index 131fa8c2..2d7ec837 100644 --- a/docs/allclasses-frame.html +++ b/docs/allclasses-frame.html @@ -2,9 +2,9 @@
- -public static class FilestackPicker.Builder
+extends java.lang.Object
+| Modifier and Type | +Method and Description | +
|---|---|
FilestackPicker.Builder |
+autoUploadEnabled(boolean autoUpload)
+Enables automatic upload for selected files.
+ |
+
FilestackPicker |
+build()
+Creates a new FilePicker instance that one can use to spawn file pickers.
+ |
+
FilestackPicker.Builder |
+config(com.filestack.Config config)
+Sets configuration object containing all of your account info (api key, policy).
+ |
+
FilestackPicker.Builder |
+displayVersionInformation(boolean displayVersionInfomation)
+Sets whether version information should be displayed in picker's menu.
+ |
+
FilestackPicker.Builder |
+mimeTypes(java.util.List<java.lang.String> mimeTypes)
+Restricts the types of files that can be uploaded.
+ |
+
FilestackPicker.Builder |
+multipleFilesSelectionEnabled(boolean allowMultipleFiles)
+Settings this value to false restricts the selection to only one file.
+ |
+
FilestackPicker.Builder |
+sources(java.util.List<java.lang.String> sources)
+Sets sources available in a picker.
+ |
+
FilestackPicker.Builder |
+storageOptions(com.filestack.StorageOptions storageOptions)
+Storage options for uploaded files.
+ |
+
FilestackPicker.Builder |
+theme(Theme theme)
+Sets the picker theme (title and colors).
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic FilestackPicker.Builder config(com.filestack.Config config)+
config - - configuration instancepublic FilestackPicker.Builder storageOptions(com.filestack.StorageOptions storageOptions)+
public FilestackPicker.Builder autoUploadEnabled(boolean autoUpload)+
autoUpload - - whether selected files should be automatically uploadedpublic FilestackPicker.Builder sources(java.util.List<java.lang.String> sources)+
Sources.
+ The sources will appear in the order you add them to the list.
+ Defaults to Camera, Device, Google Drive, Facebook, Instagram, and Dropboxsources - - lists of sources available in a pickerpublic FilestackPicker.Builder mimeTypes(java.util.List<java.lang.String> mimeTypes)+
public FilestackPicker.Builder multipleFilesSelectionEnabled(boolean allowMultipleFiles)+
allowMultipleFiles - - whether multiple file selection should be allowedpublic FilestackPicker.Builder displayVersionInformation(boolean displayVersionInfomation)+
displayVersionInfomation - - display version information in picker's menupublic FilestackPicker.Builder theme(Theme theme)+
Theme.Builder for more info.
+ Defaults to pre-assigned values.theme - - picker's theming objectpublic FilestackPicker build()+
public class FilestackPicker
+extends java.lang.Object
+| Modifier and Type | +Class and Description | +
|---|---|
static class |
+FilestackPicker.Builder |
+
| Modifier and Type | +Method and Description | +
|---|---|
static boolean |
+canReadResult(int requestCode,
+ int resultCode)
+Checks whether result acquired in
+Activity.onActivityResult(int, int, Intent)
+ can be read. |
+
static java.util.List<Selection> |
+getSelectedFiles(android.content.Intent data)
+Extracts list of files from result in
+Activity.onActivityResult(int, int, Intent). |
+
void |
+launch(android.app.Activity activity) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static boolean canReadResult(int requestCode, + int resultCode)+
Activity.onActivityResult(int, int, Intent)
+ can be read.requestCode - requestCode from Activity.onActivityResult(int, int, Intent)resultCode - resultCode from Activity.onActivityResult(int, int, Intent)public static java.util.List<Selection> getSelectedFiles(android.content.Intent data)+
Activity.onActivityResult(int, int, Intent).
+ Check with canReadResult(int, int) should be made before using this method.data - - intent received in Activity.onActivityResult(int, int, Intent)Selection)public void launch(android.app.Activity activity)+
public static class Theme.Builder
+extends java.lang.Object
+| Modifier and Type | +Method and Description | +
|---|---|
Theme.Builder |
+accentColor(int accentColor)
+Accent color.
+ |
+
Theme.Builder |
+backgroundColor(int backgroundColor)
+Background color.
+ |
+
Theme |
+build()
+Builds a new theme based on provided parameters.
+ |
+
Theme.Builder |
+textColor(int textColor)
+Text color.
+ |
+
Theme.Builder |
+title(java.lang.String title)
+Title of the Picker.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic Theme.Builder title(java.lang.String title)+
public Theme.Builder backgroundColor(int backgroundColor)+
backgroundColor - int representation of a colorpublic Theme.Builder accentColor(int accentColor)+
accentColor - int representation of a colorpublic Theme.Builder textColor(int textColor)+
textColor - int representation of a color