ANDROID
This is how I store the ParseFile List in ParseObject
ParseObject pObject = new ParseObject(); ArrayList<ParseFile> pFileList = new ArrayList<ParseFile>(); for (String thumbPath : thumbList) { byte[] imgData = convertFileToByteArray(thumbPath); ParseFile pFile = new ParseFile("mediaFiles",imgData); pFileList.add(pFile); } pObject.addAll("mediaFiles", pFileList); pObject.saveEventually();
after this call, it does not show the inserted row in the data browser, although it shows the number of rows from 1 in the table
This is how I retrieve it and get the first image from the list
List<ParseFile> pFileList = (ArrayList<ParseFile>) pObject.get("mediaFiles"); if (!pFileList.isEmpty()) { ParseFile pFile = pFileList.get(0); byte[] bitmapdata = pFile.getData();
I can get all the columns of the String, but for the column "mediaFiles" when I getData () I get thisexception. com.parse.ParseException: The target host must not be null or specified in parameters.
I noticed that in ParseFile the data and url are null.
Can someone please show me the code on how to store and retrieve multiple ParseFile objects in one ParseObject?
source share