2012-05-23 137 views
1

我正在尝试使用parse.com为Android创建平板电脑应用。 我不擅长的Android,但是我正在努力获取和使用对象是:parse.com保存图像

ParseFile applicantResume = (ParseFile)anotherApplication.get("applicantResumeFile"); 
applicantResume.getDataInBackground(new GetDataCallback() { 
    public void done(byte[] data, ParseException e) { 
    if (e == null) { 
     // data has the bytes for the resume 
    } else { 
     // something went wrong 
    } 
    } 
}); 

好像我需要保存新的对象,我只是得到了,但我有它保存这样的问题:

FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE); 
fos.write(data.getBytes()); 
fos.close(); 

任何想法如何保存数据?解析API说它是byte [],不能使它工作:(

回答

0

你需要将你的图像转换为byte [],这就是我能够做到的; My Code。在您的照片真的是。使用正确的filepath是我的麻烦。

许多电子邮件和问题上Parse.com后,我意识到,他们是不友善的android。只要我有更好的理解这一切,我打算在YouTube上发布一些教程。

祝你好运!