I am developing an Android app for installing specific apps from Google Play without go to the Google Play store. And I am searching for any way to install apk file from Google Play without using Google Play store.
I am tried the Google ads intent schema that allow you to view and install app from Google Play dialog without go to play store. If you clicked on any app ad by Google you can see that dialog here is an example of used intent:
intent://details?id=com.iqoption&inline=true&enifd=ANRrB2M-o89kpBfnxzWr-fsTrGWfRA9qoCmNGSahSVFMz7gfeFIuU6OaFB1I0pAvDLdcm0mwAe049bUXrBqGcBxkAjX63-vj_jLa3x4_-OrZOgM_kcM_9g4Sek9BeMUBZAC93wPn-QPl3LROr5PSDP1b8gX7rUmbuLU&gref=EkQKPAoICPDf5vMFEGESLACCecsK8-ZhLtqxTT5e4Cmwbb7O9uUr5luF9hDOkLwL9ICTA38SFiFhrNkEGgItwxAC8P8HARjrwrfTAiIGGAUgATAB#Intent;scheme=market;package=com.android.vending;end;
But when I change the package name of the intent its does not work. It's just moved me to Google Play store.
I used this code in my button to deal with schema:
Intent intent = null;
try {
intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
//intent.setPackage("com.android.vending");
startActivity(intent);
} catch (URISyntaxException e) {
e.printStackTrace();
}
But IT DID NOT WORK and it takes me to Google Play store. Rather than opening install dialog. Here is this the Google app ad dialog that I mean.