Anto Anto - 4 months ago 28
Android Question

Open external playstore application

I would like to open, by a button click, an external application. In my case, this external application, is Quicksupport by teamviewer.

is Possible?

Tks.

Answer
mSomeButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent = getPackageManager()
                  .getLaunchIntentForPackage("com.abc.def"); //Teamviewer's app ID
            if(intent != null) {
                Bundle extras = new Bundle(); // if you need to pass some info
                extras.putString(key1, "SomeEmail@gmail.com");
                extras.putString(key2, "ldkjgkjgioerjijbmgjQ2349487598");
                intent.putExtras(extras);
                startActivity(intent);
            }
        }
    });

For gist snippet, refer to this link.