+ * Provides a binder object that clients can use to perform operations on the queue of uploads, excepting the addition of new files.
+ *
+ * Implemented to perform cancellation, pause and resume of existing uploads.
+ */
+ @Override
+ public IBinder onBind(Intent arg0) {
+ return null;
+ }
+
+
+ /**
+ * Upload worker. Performs the pending uploads in the order they were requested.
+ *
+ * Created with the Looper of a new thread, started in {@link FileUploader#onCreate()}.
+ */
+ private final class ServiceHandler extends Handler {
+ public ServiceHandler(Looper looper) {
+ super(looper);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ uploadFile();
+ stopSelf(msg.arg1);
+ }
+ }
+
+
+
+
+ /**