I want to update my android application programmatically.
I used following code:
final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new
File(Environment.getExternalStorageDirectory()+"/AndroidTest.apk")), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
This code display dialogue box to install application.
I want to install apk automatically.
Please help me.