}
db.close();
//
+ downloadApk(id);
String apkName = id.toString() + ".apk";
Intent intent = new Intent(this, TaskActivity.class);
intent.putExtra(TaskActivity.TASK_NAME_KEY, task.getName());
}
}
}
+ private void downloadApk(Integer id){
+ DownloadApkTask task = new DownloadApkTask(this);
+ task.execute("http://www16307ue.sakura.ne.jp:3001/apks/"+id.toString()+"/download",id.toString()+".apk");
+ }
}
}
Log.d(TAG, "Try to launch " + apkName + ":" + qualName);
try {
- DexClassLoader cl = loadDex(new File(
- Environment.getExternalStorageDirectory(), apkName));
+ DexClassLoader cl = loadDex(new File(getFilesDir().getPath(),
+ apkName));
Class<?> klass = cl.loadClass(qualName);
Log.d(TAG, "Successfully loaded " + qualName);
Constructor<?> ctor = klass.getConstructor();