저는 SD 카드의 특정 폴더에서 Google 드라이브로 이미지 파일을 업로드 할 Android 애플리케이션을 설계 중입니다. saveFileToDrive 드라이브를 Google에 하나 개의 파일을 업로드하는 로직을 포함SD 카드에서 Google 드라이브로 이미지를 여러 개 업로드하는 방법은 무엇인가요?
File sdDir = Environment
.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
File yourDir = new File(sdDir, "CameraAPIDemo");
for (File f : yourDir.listFiles()) {
if (f.isFile()){
String name = f.getName();
Log.i(TAG, "name =" + name);
String CompletePath=yourDir + "/" + name;
//Decode the file from the folder to bitmap
Bitmap bmp = BitmapFactory.decodeFile(CompletePath);
saveFileToDrive(sFolderId,bmp,name);
}
:하지만 난
E/AndroidRuntime(6808): FATAL EXCEPTION: main
E/AndroidRuntime(6808): java.lang.OutOfMemoryError error while trying to upload the files.
코드를 얻고있다. 진행 방법? 제발 도와주세요 .....