June 2018
Beginner to intermediate
394 pages
9h 2m
English
In the event that the information to be contained in the file is now in the device memory, the putBytes() method for the storage reference will upload that data to a file in the Cloud Storage. The putBytes() method takes as an argument a byte array (byte[]). The use for this approach will be to upload a picture that is in memory, maybe inside an ImageView in a user interface. This picture can be separated from the ImageView object as a bitmap and after that, converted via byte stream to a byte array suitable for uploading to a Cloud Storage file. This method will also return UploadTask to manage and monitor the status of the uploading file:
imageView.setDrawingCacheEnabled(true);imageView.buildDrawingCache(); ...
Read now
Unlock full access