English 中文(简体)
a. 安装从另一个和roid体中排出的pk,而没有使用纸张
原标题:install apk from another android app without using sd card

I was able to download an apk file and stored it in my /data/data/com.android.myApp/anotherApp.apk. I was wondering if there is a way I can install this file from another app. I am currently using:

Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(filepath), "application/vnd.android.package-archive"); startActivity(intent);

我在此明确陈述:

When I run this. It gives me "Parse Error: There is a problem parsing the package". I dont know what the problem is? 1) Is it I need to store the app in the SD card? I dont want to do that 2) Permission issues? 3) corrupted package being installed?

最佳回答

通常,如果你在你的沙箱上保存档案,则在“档案”的夹子下保存。 因此,你应完全走下去:

/data/data/com.android.myApp/files/anotherApp.apk 

如果你在一名支持者上工作,如果档案确实存在的话,你可以做一个旁证,确认:

adb shell "ls /data/data/com.android.myApp/files"
问题回答

需预先分发<条码>.filepath with file http://:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://" + filepath), "application/vnd.android.package-archive"); startActivity(intent);

引致这种疾病......

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(path+"/yourapp.apk")), application/vnd.android.package-archive");
startActivity(intent);




相关问题
Correct place to install demostration projects?

With the new Windows 7 restrictions (well, new to Windows Vista anyways), we can no longer install demo projects to %ProgramFilesFolder%OurApplicationdemo since restricted users will not be able to ...

.deb package conffiles problem

I am distributing one of my applications using a .deb package, but have a problem relating to one of the files. The distribution includes a database file which is constantly updated by the app, on a ...

Closing an application using WiX

In creating my WiX installer I have run into an issue when trying to close an application before installing the upgrade. Below is an example of how I am attempting to do this. <util:...

VS 2005 Setup - HKCU

I am trying to fix an existing application that uses a Visual Studio 2005 setup project. We are requiring it to work on limited user accounts for XP, our app is written in C# for .Net 2.0. It writes ...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I ve released the code as a Google Code project. It s easy for a developer to get the source but I d ...

configsource and installer

I have an project csproj, with app.config file, and logging Ent.Library section using configsource attribute. The logging section is in ahother file Configloggingconfiguration.config. I have a ...

热门标签