コード例 #1
0
        public void addOnCompleteListenerTest()
        {
            Debug.Log("UploadTask addOnCompleteListenerTest");


            byte[] data     = new byte[10];
            string filename = "addOnCompleteListenerTest.data";

            StorageReference storageReference = mAGCStorageManagement.getStorageReference(filename);
            UploadTask       task             = storageReference.putBytes(data, new FileMetadata());

            task.addOnCompleteListener(new MyOnCompleteListener("NormalListener"))
            .addOnCompleteListener(new Activity(), new MyOnCompleteListener("ActivityListener"))
            .addOnCompleteListener(new MyExecutor("ExecutorListener"),
                                   new MyOnCompleteListener("ExecutorListener"));

            MyOnCompleteListener remove = new MyOnCompleteListener("remove");

            task.addOnCompleteListener(remove);
            task.removeOnCompleteListener(remove);

            Debug.Log("task.isComplete status: " + task.isComplete());

            Debug.Log("UploadTask addOnCompleteListenerTest success");
        }