I am having an ImageView,on click of that I want to download an apk from google play store ,without passing intent to google play store.You can see the code below which I am implementing right now but it is opening play store.I want to download whatsapp on click of the image. Please Guide.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
img=(ImageView)findViewById(R.id.img);
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse
("http://play.google.com/store/apps/details?id=" + "com.whatsapp")));
}
});
}
}