확장 파일 다운로드 테스트를 진행 중입니다.
알바 테스트로 apk와 확장 파일을 등록해놓은 상태입니다.
확장 파일을 다운로드 받는 소스는 샘플 소스를 이용하여 아래와같이 사용중데
앱을 실행하면 자꾸 앱이 죽어버리는 현상때문에 미치겠습니다 ㅜㅜ
[ 다운로드 소스]
if(!expansionFilesDelivered()){
Intent launcher = getIntent();
Intent fromNotification = new Intent(Intro.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 pIntent = PendingIntent.getActivity(Intro.this, 0, fromNotification, PendingIntent.FLAG_UPDATE_CURRENT);
try{
int result = DownloaderClientMarshaller.startDownloadServiceIfRequired(Intro.this, pIntent, ExpansionFileDownloaderService.class);
if(DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED != result){
mDownloaderClientStub = DownloaderClientMarshaller.CreateStub(this, ExpansionFileDownloaderService.class);
Toast.makeText(getApplicationContext(), "다운로드 중", Toast.LENGTH_SHORT).show();
}
}catch(NameNotFoundException e){
e.printStackTrace();
}
}
[에러 로그]
10-16 19:08:58.725: E/AndroidRuntime(10236): java.lang.NoClassDefFoundError: com.android.vending.expansion.downloader.R$string
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.google.android.vending.expansion.downloader.Helpers.getDownloaderStringResourceIDFromState(Helpers.java:268)
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.google.android.vending.expansion.downloader.impl.DownloadNotification.onDownloadStateChanged(DownloadNotification.java:106)
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.google.android.vending.expansion.downloader.impl.DownloaderService$LVLRunnable.run(DownloaderService.java:752)
10-16 19:08:58.725: E/AndroidRuntime(10236): at android.os.Handler.handleCallback(Handler.java:733)
10-16 19:08:58.725: E/AndroidRuntime(10236): at android.os.Handler.dispatchMessage(Handler.java:95)
10-16 19:08:58.725: E/AndroidRuntime(10236): at android.os.Looper.loop(Looper.java:157)
10-16 19:08:58.725: E/AndroidRuntime(10236): at android.app.ActivityThread.main(ActivityThread.java:5356)
10-16 19:08:58.725: E/AndroidRuntime(10236): at java.lang.reflect.Method.invokeNative(Native Method)
10-16 19:08:58.725: E/AndroidRuntime(10236): at java.lang.reflect.Method.invoke(Method.java:515)
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
10-16 19:08:58.725: E/AndroidRuntime(10236): at dalvik.system.NativeStart.main(Native Method)
어디서 뭐때문에 앱이 종료되는지 모르겠습니다.
확장파일 다운로드 경험 있으신분들의 도움을 청합니다 .!!