50mb가 넘어서 확장파일 만들고, 구글 개발자 콘솔에 등록도 마쳤어요.
obb파일이 저장되는 위치에 obb파일 직접 넣어서 테스트도 마쳤구요.
근데 obb파일을 삭제하고 테스트 하니 앱이 죽어버리네요 ㅠㅠ
obb파일이 없을 경우 다운로드하는 로직에 로그를 찍어봤는데.. 제대로 로직을 다 타는거 같은데 앱이 죽어버려요.ㅠㅠ
아래 소스 중
"다운로드 중..." 로그도 제대로 찍히거든요.
다운로드하는 로직을 제대로 타는 것 같은데 앱이 죽어버리네요.
뭐가 문제인건지,, 아니면 어느 부분을 확인해봐야 하는지 실마리라도 주세요 ㅠㅠ
String mainFileName = Helpers.getExpansionAPKFileName(this, true, 1);
boolean fileExists = Helpers.doesFileExist(this, mainFileName, 179039558L , false);
if (!fileExists) {
Intent launcher = getIntent();
Intent fromNotification = new Intent(this, getClass());
fromNotification.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
fromNotification.setAction(launcher.getAction());
if (launcher.getCategories() != null) {
for (String cat : launcher.getCategories()) {
fromNotification.addCategory(cat);
}
}
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, fromNotification, PendingIntent.FLAG_UPDATE_CURRENT);
try {
// Start the download
int result = DownloaderClientMarshaller.startDownloadServiceIfRequired(this, pendingIntent, ExpansionFileDownloaderService.class);
if (DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED != result) {
// implement Downloading UI.
Log.d("myLog", "다운로드 중...");
return;
}
} catch (NameNotFoundException e) {
Log.e("apk-expansion-files", "NameNotFoundException occurred. " + e.getMessage(), e);
}
}