• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps It doesnt go to Skype Application

SamoZain

Newbie
I'm added a button link to Skype application, if the mobile I have, has skype application, it goes to it, if it doesn't, it goes to https://play.google.com/store/apps/details?id=com.skype.raider
the thing is, I want to send a message to someone using Skype
So (if) send a message to someone (else) go to google play to download Skype

Here is the code

Code:
    raskypelink.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {

                   if (uri.contains("https://www.skype.com/" )) {
                        String name_here = "name_here";
                        String uri1 = "skype://Page/" + rod_abbotson;
                        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri1));
                        startActivity(intent);
                    } else {
                        String skype = "skype";
                        String uri1 = "https://play.google.com/store/apps/details?id=com.skype.raider";
                        Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(uri1));
                        startActivity(i);
                    } 
                } 
            });
 
From the official documentation, it says:

Note: scheme and host name matching in the Android framework is case-sensitive, unlike the formal RFC. As a result, you should always ensure that you write your Uri with these elements using lower case letters, and normalize any Uris you receive from outside of Android to ensure the scheme and host is lower case.

So maybe try skype://page/ (with lower case p)
 
Back
Top Bottom