Esempio n. 1
0
        public override void RegisterView(BranchUniversalObject universalObject)
        {
            BranchEvent e = new BranchEvent(BranchEventType.VIEW_ITEM);

            e.AddContentItem(universalObject);
            SendEvent(e);
        }
Esempio n. 2
0
        public override void ShareLink(IBranchLinkShareInterface callback,
                                       BranchUniversalObject universalObject,
                                       BranchLinkProperties linkProperties,
                                       string message)
        {
            BranchLinkShareListener obj = new BranchLinkShareListener(callback);

            callbacksList.Add(obj as Object);

            IO.Branch.Indexing.BranchUniversalObject resBuo = BranchAndroidUtils.ToNativeBUO(universalObject);
            IO.Branch.Referral.Util.LinkProperties   resBlp = BranchAndroidUtils.ToNativeBLP(linkProperties);

            IO.Branch.Referral.Util.ShareSheetStyle style =
                new IO.Branch.Referral.Util.ShareSheetStyle(appContext, "", message);

            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Facebook);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Twitter);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Message);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Email);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Flickr);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.GoogleDoc);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.WhatsApp);

            resBuo.ShowShareSheet(CurrActivity, resBlp, style, obj);
        }
Esempio n. 3
0
        public override void RegisterView(BranchUniversalObject universalObject)
        {
            IO.Branch.Indexing.BranchUniversalObject resBuo =
                IO.Branch.Indexing.BranchUniversalObject.CreateInstance(BranchAndroidUtils.ToJSONObject(universalObject.ToDictionary()));

            resBuo.RegisterView();
        }
Esempio n. 4
0
        public override void GetShortURL(IBranchUrlInterface callback,
                                         BranchUniversalObject universalObject,
                                         BranchLinkProperties linkProperties)
        {
            BranchUrlListener obj = new BranchUrlListener(callback);

            callbacksList.Add(obj as Object);

            IO.Branch.Indexing.BranchUniversalObject resBuo =
                IO.Branch.Indexing.BranchUniversalObject.CreateInstance(BranchAndroidUtils.ToJSONObject(universalObject.ToDictionary()));

            IO.Branch.Referral.Util.LinkProperties resBlp =
                new IO.Branch.Referral.Util.LinkProperties();

            foreach (string tag in linkProperties.tags)
            {
                resBlp.AddTag(tag);
            }

            foreach (string key in linkProperties.controlParams.Keys)
            {
                resBlp.AddControlParameter(key, linkProperties.controlParams[key]);
            }

            resBlp.SetAlias(linkProperties.alias);
            resBlp.SetChannel(linkProperties.channel);
            resBlp.SetDuration(linkProperties.matchDuration);
            resBlp.SetFeature(linkProperties.feature);
            resBlp.SetStage(linkProperties.stage);

            resBuo.GenerateShortUrl(appContext, resBlp, obj);
        }
Esempio n. 5
0
        public override void ShareLink(IBranchLinkShareInterface callback,
                                       BranchUniversalObject universalObject,
                                       BranchLinkProperties linkProperties,
                                       string message)
        {
            IOSNativeBranch.BranchUniversalObject buo = BranchIOSUtils.ToNativeUniversalObject(universalObject);
            IOSNativeBranch.BranchLinkProperties  blp = BranchIOSUtils.ToNativeLinkProperties(linkProperties);
            UIKit.UIWindow window = UIKit.UIApplication.SharedApplication.KeyWindow;

            buo.ShowShareSheetWithLinkProperties(blp, message, window.RootViewController, delegate(string url, bool isShared) {});
        }
Esempio n. 6
0
        public override void GetShortURL(IBranchUrlInterface callback,
                                         BranchUniversalObject universalObject,
                                         BranchLinkProperties linkProperties)
        {
            BranchUrlListener obj = new BranchUrlListener(callback);

            callbacksList.Add(obj as Object);

            IO.Branch.Indexing.BranchUniversalObject resBuo = BranchAndroidUtils.ToNativeBUO(universalObject);
            IO.Branch.Referral.Util.LinkProperties   resBlp = BranchAndroidUtils.ToNativeBLP(linkProperties);

            resBuo.GenerateShortUrl(appContext, resBlp, obj);
        }
Esempio n. 7
0
        public override void GetShortURL(IBranchUrlInterface callback,
                                         BranchUniversalObject universalObject,
                                         BranchLinkProperties linkProperties)
        {
            BranchUrlListener obj = new BranchUrlListener(callback);

            callbacksList.Add(obj as Object);

            IOSNativeBranch.BranchUniversalObject buo = BranchIOSUtils.ToNativeUniversalObject(universalObject);
            IOSNativeBranch.BranchLinkProperties  blp = BranchIOSUtils.ToNativeLinkProperties(linkProperties);

            buo.GetShortUrlWithLinkProperties(blp, obj.GetShortUrlCallback);
        }
Esempio n. 8
0
        public override void ShareLink(IBranchLinkShareInterface callback,
                                       BranchUniversalObject universalObject,
                                       BranchLinkProperties linkProperties,
                                       string message)
        {
            BranchLinkShareListener obj = new BranchLinkShareListener(callback);

            callbacksList.Add(obj as Object);

            IO.Branch.Indexing.BranchUniversalObject resBuo =
                IO.Branch.Indexing.BranchUniversalObject.CreateInstance(BranchAndroidUtils.ToJSONObject(universalObject.ToDictionary()));

            IO.Branch.Referral.Util.LinkProperties resBlp =
                new IO.Branch.Referral.Util.LinkProperties();

            foreach (string tag in linkProperties.tags)
            {
                resBlp.AddTag(tag);
            }

            foreach (string key in linkProperties.controlParams.Keys)
            {
                resBlp.AddControlParameter(key, linkProperties.controlParams[key]);
            }

            resBlp.SetAlias(linkProperties.alias);
            resBlp.SetChannel(linkProperties.channel);
            resBlp.SetDuration(linkProperties.matchDuration);
            resBlp.SetFeature(linkProperties.feature);
            resBlp.SetStage(linkProperties.stage);

            IO.Branch.Referral.Util.ShareSheetStyle style =
                new IO.Branch.Referral.Util.ShareSheetStyle(appContext, "", message);

            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Facebook);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Twitter);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Message);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Email);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.Flickr);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.GoogleDoc);
            style.AddPreferredSharingOption(IO.Branch.Referral.SharingHelper.SHARE_WITH.WhatsApp);

            resBuo.ShowShareSheet(CurrActivity, resBlp, style, obj);
        }
Esempio n. 9
0
 public override void ListOnSpotlight(BranchUniversalObject universalObject)
 {
     BranchIOSUtils.ToNativeUniversalObject(universalObject).ListOnSpotlight();
 }
Esempio n. 10
0
 public override void RegisterView(BranchUniversalObject universalObject)
 {
     BranchIOSUtils.ToNativeUniversalObject(universalObject).RegisterView();
 }
Esempio n. 11
0
 /// <summary>
 /// Shares the link.
 /// </summary>
 /// <param name="callback">Callback.</param>
 /// <param name="universalObject">Universal object.</param>
 /// <param name="linkProperties">Link properties.</param>
 /// <param name="message">Message.</param>
 abstract public void ShareLink(IBranchLinkShareInterface callback,
                                BranchUniversalObject universalObject,
                                BranchLinkProperties linkProperties,
                                string message);
Esempio n. 12
0
 /// <summary>
 /// Get a short url with specified universal object and link properties.
 /// </summary>
 /// <param name="callback">The callback that is called once the request has completed.</param>
 /// <param name="universalObject">Universal object.</param>
 /// <param name="linkProperties">Link properties.</param>
 abstract public void GetShortURL(IBranchUrlInterface callback,
                                  BranchUniversalObject universalObject,
                                  BranchLinkProperties linkProperties);
 /// <summary>
 /// Index the content on Spotlight Search.
 /// </summary>
 /// <param name="universalObject">Universal object.</param>
 abstract public void ListOnSpotlight(BranchUniversalObject universalObject);
Esempio n. 14
0
 // Use this method to add any BranchUniversalObject associated with this event
 public void AddContentItem(BranchUniversalObject contentItem)
 {
     contentItems.Add(contentItem.ToJsonString());
 }
Esempio n. 15
0
 public override void RegisterView(BranchUniversalObject universalObject)
 {
     IO.Branch.Indexing.BranchUniversalObject resBuo = BranchAndroidUtils.ToNativeBUO(universalObject);
     NativeBranch.RegisterView(resBuo, null);
 }
Esempio n. 16
0
 public override void ListOnSpotlight(BranchUniversalObject universalObject)
 {
     IO.Branch.Indexing.BranchUniversalObject resBuo = BranchAndroidUtils.ToNativeBUO(universalObject);
     resBuo.ListOnGoogleSearch(appContext);
 }
Esempio n. 17
0
 /// <summary>
 /// Registers the view.
 /// </summary>
 /// <param name="universalObject">Universal object.</param>
 abstract public void RegisterView(BranchUniversalObject universalObject);