Giter VIP home page Giter VIP logo

uploadcare / uploadcare-android Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 12.0 2.57 MB

Android Upload widget and API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.

Home Page: https://uploadcare.com

License: Other

Java 0.35% Kotlin 99.65%
uploadcare android api client sdk upload processing image-processing image-recognition file-upload image-upload uploader

uploadcare-android's Introduction

Android integration for Uploadcare

build

Uploadcare Android integration handles uploads and further operations with files by wrapping Upload and REST APIs.

Check out demo app.

Features

Library

Supported features:

  • File, group, and project API v0.7.
  • Paginated resource fetching.
  • CDN path builder.
  • File uploading from a file, byte array, URL, and URI.
  • Synchronous and asynchronous operation modes.
  • Concise and easy-to-use library without extra resources and drawables.

Guide/Examples/Docs

File Uploader

Supported features:

  • Upload images, videos & other files from a local disk, camera, social networks, and cloud services.
  • Social network authorization and file selection.
  • Widget appearance customization and styles.
  • Uploadcare Android library for direct Uploadcare APIs access.
  • Material design.

Guide/Examples/Docs

Useful links

Library documentation
File Uploader documentation
Uploadcare documentation
Upload API reference
REST API reference
Changelog
Contributing guide
Security policy
Support

Developer's guide

Pre-requisites

  • Gradle 7.6
  • JDK 11
  • Android SDK 34

uploadcare-android's People

Contributors

carlspring avatar chek539 avatar chinalwb avatar dependabot[bot] avatar dmitry-mukhin avatar justkarleone avatar justkarleonedt avatar michaos1 avatar onthecrow avatar raphaelnew avatar rsedykh avatar steve-todorov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uploadcare-android's Issues

Control of the image before upload

Brief description of the feature and motivation behind it

For an implementation that I am working on, the client needs to be able to select an image, crop it to a set ratio and then upload the image. At present this is possible on the Web Plugin but not the Android plugin

The feature suggestion would be to add a pre-upload call back that returns the local file (if selected locally) or if the image is a social media image, the image is downloaded first and then passed to the user.

Modifications can be then made to the image before passing to an upload method.

Ideally features such as cropping could be integrated as part of the Widget to avoid additional 3rd party integrations.

The lack of this feature has made me drop the usage of upload care in the android app as it cannot perform on par with the web implementation.

There are a lot of cases where the user may not want to use the image exactly as it is on their device or social media and giving the user the ability to make changes will be a massive benefit.

As an alternative, I've considered other platforms such as filestack.io or native implementations.

Current usage

UploadcareWidget.getInstance(context).selectFileFrom(
                fragment,
                SocialNetwork.SOCIAL_NETWORK_FACEBOOK,
                FileType.image,
                storeUponUpload)

Proposed new method with optional callback

UploadcareWidget.getInstance(context).selectMutableFileFrom(
                fragment,
                SocialNetwork.SOCIAL_NETWORK_FACEBOOK,
                FileType.image) { image ->
                     //image object is returned here
                }

uploaded file id:null

I started getting this error when I set minifyEnabled = true in my gradle file. With this set to true, I can NOT upload a photo. But when removed, its working just fine. But I need that enabled.

Here's what's on logs:

I: uploaded file id:null
W: com.uploadcare.android.library.exceptions.UploadFailureException: Upload failed
W: at com.uploadcare.android.library.upload.UploadTask.b(SourceFile:227)
W: at com.uploadcare.android.library.upload.UploadTask.onPostExecute(SourceFile:212)
W: at android.os.AsyncTask.finish(AsyncTask.java:651)
W: at android.os.AsyncTask.access$500(AsyncTask.java:180)
W: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
W: at android.os.Handler.dispatchMessage(Handler.java:102)
W: at android.os.Looper.loop(Looper.java:148)
W: at android.app.ActivityThread.main(ActivityThread.java:7406)
W: at java.lang.reflect.Method.invoke(Native Method)
W: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
W: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Please help.

minSdkVersion 22 problem

I have problem with your latest version it's force me to make minSdkVersion to 22 but our requirement for our app it should be 19 or 20 because we have users use this version
please give me suggestion to resolve this problem please

Wrong wrap_content value

A problem in FilesGridAdapter -> in layout file the height must be wrap_content for the main FrameLayout

signature: Secure uploads support

Hey guys!

The demo app works great! However I don't see the support for secure uploads in the library, i.e.: I want to use secure uploads, but cannot set my signature into the FileUploader or MultipleFilesUploader.

Could you please check and make it available? Or if I am wrong, could you please guide me how to set my signature to the uploader?

Thanks.

Library does not work with AndroidX

Describe the bug

Implementing UploadCare into a project using AndroidX throws the following error when calling:

UploadcareWidget.getInstance(context).selectFile(this, true)

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;

Steps:
Implement Widget using instructions for Kotlin at https://github.com/uploadcare/uploadcare-android/blob/master/widget/README.md

Expected behavior

Widget should load as designed.

Environment

  • Library version: 2.2.0
  • Language/framework version: Kotlin
  • OS version: Android Q - API 29

Convertion

  • Convert document
  • Document conversion job status
  • Convert video
  • Video conversion job status

Incorrect Response in FileUploader - onSuccess Method

Describe the bug

We're facing a strange issue, we're using the uploadcare Android library 3.1.0, we're using the uploadAsync method of the FileUploader object to upload images, the image upload succeeds and we can see the uploaded images on the Uploadcare web portal, in the Android code the onSuccess block of the uploadAsync method is called but the originalFileUrl and url properties of the UploadcareFile object are null. Also, the uploaded and stored date properties are null but when we open the image in the Uploadcare console all of these properties have their correct values so not sure what's going wrong in the Android SDK. The same issue occurs if we use the sync upload method.

Expected behavior

The UploadcareFile object must have the correct originalFileUrl value.

Code / screenshots

Upload code:

fun File.upload(callback: (FileUploadResult) -> Unit) {
    val bytes = readBytes()
    val client = UploadcareClient("###")
    val uploader = FileUploader(client, bytes, name).store(true)
    val defaultErrorMessage = "Error uploading file. Please try again later."

    uploader.uploadAsync(object : UploadFileCallback {
        override fun onFailure(e: UploadcareApiException) {
            callback(FileUploadResult(false, "", e.localizedMessage ?: defaultErrorMessage, ""))
        }

        override fun onProgressUpdate(
            bytesWritten: Long,
            contentLength: Long,
            progress: Double) {
        }

        override fun onSuccess(result: UploadcareFile) {
            callback(FileUploadResult(true, result.originalFileUrl.toString(), "", result.uuid) )
        }
    })
}

Response object:

UploadcareFile File id: f5fa549a-2d75-4df4-a2ee-8c6fd602e136 Url: null Size: 60967 Mime type: image/png is Ready: true is Image: true Original Filename: Asset [email protected] Original File Url: null Date uploaded: null is Stored: false Date stored: null is Removed: false Date removed: null Source: null Image Info: ImageInfo(format=PNG, height=226, width=310, orientation=null, sequence=false, colorMode=RGBA, geoLocation=null, datetimeOriginal=null, dpi=null) Video Info: null Variations: null Rekognition Info: null

Environment

  • Library version: 3.1.0
  • Language/framework version: Kotlin 1.8
  • OS version: Android API Level 30

API version migration from v0.6 to v0.7

The following files will be changed as part of the migration:

  • UploadcareFile:
    Remove the following fields: image_info, video_info, rekognition_info, as they have been removed from the API scheme.
    Add the following fields: content_info, metadata, appdata, as they have been added to the API scheme.

  • UrlParameters:
    Rename the AddFieldsParameter class to IncludeParameter.

  • FilesQueryBuilder:
    Rename the addFields() method to include().

  • UploadcareClient:
    Rename the getFileWithRekognitionInfo() method to getFileWithAppData().
    Change the endpoint that the deleteFile() method is using to apiFileStorage because the old one was replaced with this one.
    Remove the storeGroup() method, as its endpoint has been removed.
    Change the createWebhook() and updateWebhook() methods' the type of parameter event to enum.

  • FilesQueryBuilder:
    Remove the sorting method by file size, as its parameter has been removed from the API query parameters.

  • FilesFragment:
    Remove sorting options by file size.

  • UploadcareWebhook:
    Change the type of parameter event to enum.
    Add the following enum constants for event types: file.uploaded, file.infected, file.stored, file.deleted, file.info_updated.

onFailure invoked although file uploaded

Describe the bug

Storing an mp4 uploads the file successfully (I can see it in the dashboard) but getting onFailure where message is a string containing code=400

Expected behavior

Code / screenshots

com.uploadcare.android.library.exceptions.UploadFailureException: Response{protocol=h2, code=400, message=, url=https://api.uploadcare.com/files/79f25963-74b0-473a-bec4-052cbc816066/} at com.uploadcare.android.library.upload.FileUploader$uploadAsync$1$2.invokeSuspend(FileUploader.kt:258) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7842) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Environment

  • Library version: 3.1.0
  • Language/framework version:
  • OS version: Emulator latest android version

App Crash on scrolling network list

Describe the bug

App Crash on scrolling the network list when using uploadcare widget

Steps to reproduce

  1. Open example app
  2. Select "Upload any file from any network" under widget demos
  3. Scroll the network list

App crash with Resources$NotFoundException: Resource ID #0xffffffff

Expected behavior

App should not crash and list should scroll

Code / screenshots

2021-12-27 19:16:53.252 10577-10577/com.uploadcare.android.example E/MessageQueue-JNI: android.content.res.Resources$NotFoundException: Resource ID #0xffffffff
        at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:237)
        at android.content.res.Resources.getValue(Resources.java:1351)
        at androidx.appcompat.widget.ResourceManagerInternal.createDrawableIfNeeded(ResourceManagerInternal.java:176)
        at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:141)
        at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:132)
        at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:104)
        at androidx.appcompat.widget.AppCompatImageHelper.setImageResource(AppCompatImageHelper.java:90)
        at androidx.appcompat.widget.AppCompatImageView.setImageResource(AppCompatImageView.java:98)
        at com.uploadcare.android.widget.utils.BindingAdapters$Companion.setImageBitmap(BindingAdapters.kt:31)
        at com.uploadcare.android.widget.utils.BindingAdapters.setImageBitmap(Unknown Source:2)
        at com.uploadcare.android.widget.databinding.UcwDialogNetworkItemBindingImpl.executeBindings(UcwDialogNetworkItemBindingImpl.java:140)
        at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:473)
        at androidx.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:445)
        at com.uploadcare.android.widget.adapter.SocialNetworksAdapter.getView(SocialNetworksAdapter.kt:54)
        at android.widget.AbsListView.obtainView(AbsListView.java:2405)
        at android.widget.ListView.addViewBelow(ListView.java:3347)
        at android.widget.ListView.scrollListItemsBy(ListView.java:3277)
        at android.widget.ListView.arrowScrollImpl(ListView.java:2760)
        at android.widget.ListView.arrowScroll(ListView.java:2664)
        at android.widget.ListView.commonKey(ListView.java:2425)
        at android.widget.ListView.onKeyDown(ListView.java:2367)
        at android.view.KeyEvent.dispatch(KeyEvent.java:2801)
        at android.view.View.dispatchKeyEvent(View.java:13352)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1917)
        at android.widget.ListView.dispatchKeyEvent(ListView.java:2352)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:453)
        at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1839)
        at android.app.Dialog.dispatchKeyEvent(Dialog.java:825)
        at androidx.appcompat.app.AppCompatDialog.superDispatchKeyEvent(AppCompatDialog.java:208)
        at androidx.appcompat.app.AppCompatDialog$1.superDispatchKeyEvent(AppCompatDialog.java:48)
        at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:84)
        at androidx.appcompat.app.AppCompatDialog.dispatchKeyEvent(AppCompatDialog.java:214)
        at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
        at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3054)
        at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:367)
        at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:5413)
        at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5281)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4841)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4807)
        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4947)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4815)
    	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl
2021-12-27 19:16:53.259 10577-10577/com.uploadcare.android.example D/AndroidRuntime: Shutting down VM
    
    
    --------- beginning of crash
2021-12-27 19:16:53.264 10577-10577/com.uploadcare.android.example E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.uploadcare.android.example, PID: 10577
    android.content.res.Resources$NotFoundException: Resource ID #0xffffffff
        at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:237)
        at android.content.res.Resources.getValue(Resources.java:1351)
        at androidx.appcompat.widget.ResourceManagerInternal.createDrawableIfNeeded(ResourceManagerInternal.java:176)
        at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:141)
        at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:132)
        at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:104)
        at androidx.appcompat.widget.AppCompatImageHelper.setImageResource(AppCompatImageHelper.java:90)
        at androidx.appcompat.widget.AppCompatImageView.setImageResource(AppCompatImageView.java:98)
        at com.uploadcare.android.widget.utils.BindingAdapters$Companion.setImageBitmap(BindingAdapters.kt:31)
        at com.uploadcare.android.widget.utils.BindingAdapters.setImageBitmap(Unknown Source:2)
        at com.uploadcare.android.widget.databinding.UcwDialogNetworkItemBindingImpl.executeBindings(UcwDialogNetworkItemBindingImpl.java:140)
        at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:473)
        at androidx.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:445)
        at com.uploadcare.android.widget.adapter.SocialNetworksAdapter.getView(SocialNetworksAdapter.kt:54)
        at android.widget.AbsListView.obtainView(AbsListView.java:2405)
        at android.widget.ListView.addViewBelow(ListView.java:3347)
        at android.widget.ListView.scrollListItemsBy(ListView.java:3277)
        at android.widget.ListView.arrowScrollImpl(ListView.java:2760)
        at android.widget.ListView.arrowScroll(ListView.java:2664)
        at android.widget.ListView.commonKey(ListView.java:2425)
        at android.widget.ListView.onKeyDown(ListView.java:2367)
        at android.view.KeyEvent.dispatch(KeyEvent.java:2801)
        at android.view.View.dispatchKeyEvent(View.java:13352)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1917)
        at android.widget.ListView.dispatchKeyEvent(ListView.java:2352)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1922)
        at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:453)
        at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1839)
        at android.app.Dialog.dispatchKeyEvent(Dialog.java:825)
        at androidx.appcompat.app.AppCompatDialog.superDispatchKeyEvent(AppCompatDialog.java:208)
        at androidx.appcompat.app.AppCompatDialog$1.superDispatchKeyEvent(AppCompatDialog.java:48)
        at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:84)
        at androidx.appcompat.app.AppCompatDialog.dispatchKeyEvent(AppCompatDialog.java:214)
        at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
        at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3054)
        at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:367)
        at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:5413)
        at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5281)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4841)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4807)
        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4947)
2021-12-27 19:16:53.268 10577-10577/com.uploadcare.android.example E/AndroidRuntime:     at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4815)
        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5004)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4841)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4807)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4815)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4841)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4807)
        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4947)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4815)
        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5004)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4841)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4807)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4815)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4841)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4807)
        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4947)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4815)
        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5004)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
        at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7505)
        at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7474)
        at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7435)
        at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7630)
        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:188)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:336)
        at android.os.Looper.loop(Looper.java:174)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
    
    
    --------- beginning of system

Environment

  • Library version: 3.1.0
  • Language/framework version:
  • OS version: Android

Remove `android:allowBackup` from library manifest

Describe the bug

Being as a lib / sdk, we don't want to hardcode <application android:allowBackup="true" because it's sdk user's job to define it as whether true or false, but due to we set it at library, all users will have to add an extra line of tools:replace="android:allowBackup" to override if they want to set it as false.

Expected behavior

  • This line of configuration should be removed.

Code / screenshots

See the code at:

<application android:allowBackup="true"

Environment

  • Library version: 3.1.0
  • Language/framework version: Android
  • OS version:

Fix The Widget always returns `UploadcareWidgetResult` with non-null exception

The Widget always returns UploadcareWidgetResult with non-null property exception: UploadcareException after calling ActivityResultLauncher<UploadcareWidgetParams>.launch().

To reproduce it you have to execute the following code:

val uploadcareLauncher = registerForActivityResult(UploadcareActivityResultContract) { result ->
        result?.let { viewModel.onUploadResult(result) }
}

val params = UploadcareWidgetParams(
            style = -1,
            network = null,
            cancelable = false,
            showProgress = false,
            backgroundUpload = false
)

uploadcareLauncher.launch(params)

To fix it we have to remove calling SocialApi.getSources() method in the Widget.

Setup publishing to Maven Central

Task Description

We used to publish our artifacts to JCenter. Unfortunately, as of May 2021 package publications to JCenter have been halted as part of the plan to sunset the JCenter service (more here).

As a result, we need to start publishing our artifacts to Maven Central instead of JCenter.

Tasks

The following tasks will need to be carried out:

  • Investigate the current state of the code.
  • Plan what needs to be done and append it to the list.
  • Raise request for access from Sonatype.
  • Receive necessary access.
  • Create new GPG keys and publish them.
  • Setup publishing in gradle build scripts (using the new GPG keys)
  • Create a build pipeline (builds pull requests).
  • Create a deploy pipeline which builds, signs and deploys artifacts from a tagged release to Maven Central.

Task Relationships

This task:

  • Is a sub-task of: #
  • Depends on: #
  • Is a follow-up of: #
  • Relates to:

Useful Links

Help

Webhooks

  • List of webhooks
  • Create webhook
  • Update webhook
  • Delete webhook
  • Pagination
  • Filters
  • Sorting

Don't store private key on client side

I’m android developer and using Uploadcare. How can I use UploadcareClient without privatekey? (In Android) I just need to upload files not more. In most APIs UploadcareClient does not need privatekey. But in Android it is necessary and this is not safe. Nobody (professional developer) store private key in client side. this is so important subject and I wondered when I understood it as CTO. Anyway we can’t accept its risks because we set private key inside of our app and it can recovery easily by a “app cracker” so please check/report this problem to solve it in shortest time kindly.

Migrate Gradle builds to kotlin style

Task Description

Migrate gradle builds from groovy to kotlin style for consistency and better type-safety.

Tasks

The following tasks will need to be carried out:

  • Migrate the current Groovy style build scripts to Kotlin style.
  • Update dependencies necessary for the switch to kotlin build style (without introducing breaking changes)

Task Relationships

This task:

  • Is a sub-task of: #
  • Depends on: #
  • Is a follow-up of: #
  • Relates to: #

Set up a CodeQL Github Workflow

Task Description

Set up a CodeQL Github Workflow that checks for vulnerabilities in the existing code and pull requests.

Tasks

The following tasks will need to be carried out:

  • Add daily cron task that runs at 08:30.
  • Add a check against pull requests based on the master.
  • Add a check on push against the master.

Task Relationships

This task:

  • Is a sub-task of:
  • Depends on:
  • Is a follow-up of:
  • Relates to:

Useful Links

Help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.