SocialXT.Share with more customization

Hello,

I have two questions, I was wondering how to :

  • remove Airdrop if possible
  • position popover where I want (it seems it is possible from what I see in the SocialXT.Share function but I don’t understand some vars from DLL wrap so if you can provide this function so that we can create one adapted to our need, it will help)

Thank you,
Cédric

Hi, SocialXT.Share() has as second argument for excluded types. To exclude AirDrop, you can all it like this:

SocialXT.Share(
	new object[] { "Hello" },
	new string[] { "com.apple.UIKit.activity.AirDrop" }
);

If you want to move the popover, you can take a look at our source at: u3dxt/src/highlevel/social/Social/SocialXT.cs at master · vitapoly/u3dxt · GitHub. You only need the Share() and _activityViewCompleted() methods. Inside the Share() method, you can change the popover rect’s size and position.

Sorry I wasn’t able to create a New TAG U3DXT as I don’t have a 50 reputation whatever that means.

Is there a way to include a subject heading in SocialXT.Share?

UPDATE - note could still use your help about my image resolution issues thanks.

I figured out how to include Subject field in SocialXT. When I get a chance I’ll see if I can post it to github.

In short it’s something along the lines of:

		if (excludedActivityTypes != null)
			vc.excludedActivityTypes = excludedActivityTypes;

		if (subjectForActivityType != null)
			vc.SetValueForKey(subjectForActivityType,"subject");

Where subjectForActivityType is = “My subject heading”

Also I would like to include a picture of my game icon when using the Activity Sheet (SocialXT.Share) but the graphic appears blown up and blurry when posting to Facebook or Twitter. If I choose to make the post a message or email the icon appears as the proper size. So is there a specific image resolution / format that should be used for proper image rescaling? I heard 111 x 74 might work but the quality looks too poor. If you go too large the image dominates the screen for emails and sms messages. Ideally I would like the icon to link back to my App in the store.

 public void onShare(GameObject sender)
 {
     SocialXT.Share(new object[] {
         "I just beat level "+currentlevel+" in My Video Game! "+score+" points."),
         https://itunes.apple.com/us/app/my-video-game/id555333111?mt=8&uo=4",
         _logo 
     }
     new string[] { UIActivity.TypeAssignToContact, UIActivity.TypeCopyToPasteboard, UIActivity.TypePrint, UIActivity.TypeSaveToCameraRoll,"com.apple.UIKit.activity.AddToReadingList","com.apple.UIKit.activity.AirDrop"  });
 }