I want to know if its possible to make a button that can launch any app (assuming the user has it installed) with the package name, i dont think its possible but someone out there might know how.
document.location.href = 'intent:#Intent;scheme=app_scheme;package=app_package;end;';
just goes to the google play app showing the app_package app
ive tried one or two other things but there hasnt been anything else that works
2
Answers
yes by using this code
Button launchButton = findViewById(R.id.launchButton);
launchButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
String packageName = "exampleapp"; // replace with the package name of the target app
});
It is done via a link, not a package but if you want this should be search inside google play i thing so you can use api for search via package.
like this
https://play.google.com/store/search?q=yourpackage