Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This stops the direct activity sharing been selected on the android platform where instagram registers multiple activities as shown below:

- com.instagram.direct.share.handler.DirectExternalPhotoShareActivity
- com.instagram.share.handleractivity.ShareHandlerActivity
- com.instagram.share.handleractivity.StoryShareHandlerActivity

The story share handler is implied by passing multiple images through to the plugin.
  • Loading branch information
bennimmo committed Jan 18, 2021
1 parent 067b761 commit 527ceff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/android/nl/xservices/plugins/SocialSharing.java
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,10 @@ private ActivityInfo getActivity(final CallbackContext callbackContext, final In
for (final ResolveInfo app : activityList) {
if ((app.activityInfo.packageName).contains(appPackageName)) {
if (appName == null || (app.activityInfo.name).contains(appName)) {
return app.activityInfo;
if (appPackageName == "instagram"
&& app.activityInfo.name.contains("ShareHandlerActivity")) {
return app.activityInfo;
}
}
}
}
Expand Down

0 comments on commit 527ceff

Please sign in to comment.