{"id":20119601,"url":"https://github.com/box/box-android-browse-sdk","last_synced_at":"2025-05-06T14:32:37.623Z","repository":{"id":30402715,"uuid":"33955488","full_name":"box/box-android-browse-sdk","owner":"box","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-02T00:41:51.000Z","size":1309,"stargazers_count":12,"open_issues_count":3,"forks_count":24,"subscribers_count":59,"default_branch":"master","last_synced_at":"2024-05-14T00:02:55.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/box.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-14T20:31:43.000Z","updated_at":"2023-09-08T16:56:43.000Z","dependencies_parsed_at":"2023-02-18T13:01:08.902Z","dependency_job_id":null,"html_url":"https://github.com/box/box-android-browse-sdk","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-android-browse-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-android-browse-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-android-browse-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-android-browse-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/box","download_url":"https://codeload.github.com/box/box-android-browse-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224509404,"owners_count":17323079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T19:16:16.818Z","updated_at":"2024-11-13T19:16:18.130Z","avatar_url":"https://github.com/box.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Box Android Browse SDK\n==============\nThis SDK enables the ability to easily browse through Box storage to pick a folder/file.\n\nDeveloper Setup\n--------------\nThe SDK can be obtained by adding it as a maven dependency, cloning the source into your project, or by downloading one of the precompiled JARs from the releases page on GitHub.\n\nGradle: \n```groovy \nimplementation 'com.box:box-android-browse-sdk:3.0.0'\n```\nMaven: \n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.box\u003c/groupId\u003e\n    \u003cartifactId\u003ebox-android-browse-sdk\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIf not using Gradle or Maven, this SDK has the following dependencies and will need to be included in your project:\n* [box-android-sdk](https://github.com/box/box-android-sdk) (maven: `com.box:box-android-sdk:5.0.0`)\n\nThe SDK was migrated to AndroidX in version 3.0.0. Latest stable version with support library is 2.1.0.\n\nQuickstart\n--------------\nYou will need a BoxSession and the BoxItem from the [box-content-sdk](https://github.com/box/box-android-content-sdk). Please refer to the documentation of the box-content-sdk for additional details.\n```java\n    BoxSession session = new BoxSession(MainActivity.this);\n    BoxFolder folder = new BoxApiFolder(session).getInfo(\"\u003cFOLDER_ID\u003e\").send();\n```\n####File Picker\nTo launch the activity to browse a given folder and pick a file:\n```java\n    startActivityForResult(BoxBrowseFileActivity.getLaunchIntent(MainActivity.this, \"\u003cFOLDER_ID\u003e\", session), \"\u003cYOUR_REQUEST_CODE\u003e\");\n```\n\nTo receive the result from the file picker after you picked a file, implement onActivityResult in your activity:\n```java\n    @Override\n    protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n        if (requestCode ==  \"\u003cYOUR_REQUEST_CODE\u003e\") {\n            if (resultCode == Activity.RESULT_OK) {\n                BoxFile boxFile = (BoxFile) data.getSerializableExtra(FilePickerActivity.EXTRA_BOX_FILE);\n                // Your own code to handle boxFile goes here.\n            } else {\n                // Your error handling code.\n            }\n        }\n    }\n```\n\n####Folder Picker\nTo launch the activity to browse a given folder and pick a folder:\n```java\n    startActivityForResult(BoxBrowseFolderActivity.getLaunchIntent(MainActivity.this, \"\u003cFOLDER_ID\u003e\", session),  \"\u003cYOUR_REQUEST_CODE\u003e\");\n```\n\nTo receive the result from the file picker after you picked a folder, implement onActivityResult in your activity:\n```java\n    @Override\n    protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n        if (requestCode ==  \"\u003cYOUR_REQUEST_CODE\u003e\") {\n            if (resultCode == Activity.RESULT_OK) {\n                BoxFolder boxFolder = (BoxFolder) data.getSerializableExtra(FolderPickerActivity.EXTRA_BOX_FOLDER);\n                // Your own code to handle boxFile goes here.\n            } else {\n                // Your error handling code.\n            }\n        }\n    }\n```\n\nSample App\n--------------\nA sample app can be found in the [box-browse-sample](https://github.com/box/box-android-browse-sdk/tree/master/box-browse-sample) folder.\n\nCopyright and License\n--------------\nCopyright 2015 Box, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fbox-android-browse-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbox%2Fbox-android-browse-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fbox-android-browse-sdk/lists"}