I want to install apk file from my application.
I created an application containing a button, when I click this button, then another apk that I saved in the resources folder must be installed,
Here is what I did:
public void onClick(View v) { // Intent intent = new Intent("com.google.zxing.client.android.SCAN"); // intent.setPackage("com.google.zxing.client.android"); // intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); // startActivityForResult(intent, 0); File file = new File("android.resource://com.app.barcodescanner/raw", "scan.apk"); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive"); startActivity(intent); }
any ideas? Please help me with this.
android
sUrAj
source share