在一个应用中,通过一个按钮或者其他的控件,监听事件后,会弹出安装apk的那个界面,求哪位大神能给我个帮助,跪求啊!

Android??代码安装apk Android 代码安装apk asset文件夹下的apk
------解决方案--------------------
patch = activity().getAssets() 获取路径
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("patch"+"solitaire.apk"),
"application/vnd.android.package-archive");
startActivity(intent);
试试看
------解决方案--------------------
sorry 我的错误 上来的patch 解释错误
getResources().getAssets().openFd("asd.xml").toString();
asd.xml 是attrs下面的文件
------解决方案--------------------
还是错的 ,我太坑爹了。
# public void onCreate(Bundle savedInstanceState) {
# super.onCreate(savedInstanceState);
# setContentView(R.layout.main);
#
# Intent intent = new Intent(Intent.ACTION_VIEW);
# intent.setDataAndType(Uri.parse("file://"
# + "/sdcard/solitaire.apk"),
# "application/vnd.android.package-archive");
# startActivity(intent);
这是sd卡安装的方法
------解决方案--------------------
将他通过文件输入流方式写到SDK下面存储,然后安装SDK下的这个APK就可以了。
------解决方案--------------------
如果放置在sd卡成功后,直接调用
Intent intent = new Intent(Intent.ACTION_VIEW);