java - 七牛云SDK是否支持Android端使用线程池自己维护线程处理任务?
PHPz
PHPz 2017-04-18 09:14:30
0
1
414

Android项目需要使用七牛云存储,我想通过自己管理线程池去开启上传,同时上传多张图片,但是集成SDK的时候发现,七牛的SDK网络加载均是开启异步线程的,如果是直接在线程池中使用SDK的话,岂不是在子线程中又开启了子线程,我该如何实现自己在线程池中进行管理上传呢?七牛是否支持完成七牛认证的同时自己写上载方法的实现方式呢?

PHPz
PHPz

学习是最好的投资!

reply all(1)
大家讲道理

First of all, it is completely possible to start a thread in a child thread, and there is no parent-child relationship between threads, they are equal;

Secondly, for Android development, you can obtain the connection in the thread pool in the Service. The Service runs in the UI thread. You can obtain the Service object wherever there is a Context object, and then uniformly manage the sub-threads through the Service; then call Seven The put() method of the UploadManager object in Niu SDK uploads files;

As for the last question, according to the upload interface documentation provided by Qiniu, you must first obtain the token assigned by the server as a parameter of the put() method before uploading.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!