Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed setPackage call for LaunchIntent #52

Merged
merged 1 commit into from
May 20, 2016
Merged

Conversation

calclavia
Copy link
Contributor

I tested the startapp plugin for Android, but it never worked properly with Instagram (opening a user profile). The problem was that it opens Instagram in Android, but never opens the user's profile page. I discovered that by making this change, it fixes the issue.

        Intent insta = new Intent(, uri);
        insta.setAction(Intent.ACTION_VIEW);
        insta.setData(Uri.parse("http://instagram.com/_u/someUsername"));
        insta.setPackage("com.instagram.android");
        cordova.getActivity().startActivity(insta);

I tested the startapp plugin for Android, but it never worked properly with Instagram (opening a user profile). The problem was that it opens Instagram in Android, but never opens the user's profile page. I discovered that by making this change, it fixes the issue.
```
        Intent insta = new Intent(, uri);
        insta.setAction(Intent.ACTION_VIEW);
        insta.setData(Uri.parse("http://instagram.com/_u/someUsername"));
        insta.setPackage("com.instagram.android");
        cordova.getActivity().startActivity(insta);
```
@lampaa
Copy link
Owner

lampaa commented May 20, 2016

Hi, @calclavia
Thank you, I thought that Intent(String package) and intent.setPackage(String package) is equivalent.

@lampaa lampaa merged commit 116ad62 into lampaa:master May 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants