Could not open the associated application with (company profile) url another Android application?

I want to open the URL of my application, that is, " http://www.linkedin.com/company/company-name ", if the LinkedIn application is installed, you need to start the application. Otherwise, open it by launching the browser. My code is as follows: `

public void launchLinkedIn()
 {
        final String urlFb = "linkedin://" + pageId;
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse(urlFb));

        final PackageManager packageManager = activity.getPackageManager();
        List<ResolveInfo> list = packageManager.queryIntentActivities(intent,
                PackageManager.MATCH_DEFAULT_ONLY);

        if (list.size() == 0) {
            final String urlBrowser = "http://www.linkedin.com/company/" + pageId;
            intent.setData(Uri.parse(urlBrowser));
        }
        activity.startActivity(intent);
    }

`

Now this code is called directly for viewing, even if I have a related application .. Please help someone for me. Thanks in advance.

+4
source share
1 answer

I know this a few months ago, but now I am facing the same problem

APKTool : , , ,

you
profile/memberId
group/groupId

, , , , .

setClassName(), , ,

, - linkedin-j

, -

+2

All Articles