Ejemplo n.º 1
0
        public override void RegisterView(BranchUniversalObject universalObject)
        {
            IO.Branch.Indexing.BranchUniversalObject resBuo =
                IO.Branch.Indexing.BranchUniversalObject.CreateInstance(BranchAndroidUtils.ToJSONObject(universalObject.ToDictionary()));

            resBuo.RegisterView();
        }
Ejemplo 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);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
 public override void UserCompletedAction(String action, Dictionary <string, object> metadata = null)
 {
     if (metadata != null)
     {
         NativeBranch.UserCompletedAction(action, BranchAndroidUtils.ToJSONObject(metadata));
     }
     else
     {
         NativeBranch.UserCompletedAction(action);
     }
 }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        public override void GetShortUrl(IBranchUrlInterface callback,
                                         int type = Constants.URL_TYPE_UNLIMITED,
                                         Dictionary <String, dynamic> parameters = null,
                                         string channel            = "",
                                         string stage              = "",
                                         ICollection <String> tags = null,
                                         string feature            = "")
        {
            BranchUrlListener obj = new BranchUrlListener(callback);

            callbacksList.Add(obj as Object);

            NativeBranch.GetShortUrl(type, tags, channel, feature, stage, BranchAndroidUtils.ToJSONObject(parameters), obj);
        }
Ejemplo n.º 7
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);
        }
Ejemplo n.º 8
0
 public override void ListOnSpotlight(BranchUniversalObject universalObject)
 {
     IO.Branch.Indexing.BranchUniversalObject resBuo = BranchAndroidUtils.ToNativeBUO(universalObject);
     resBuo.ListOnGoogleSearch(appContext);
 }
Ejemplo n.º 9
0
 public override void RegisterView(BranchUniversalObject universalObject)
 {
     IO.Branch.Indexing.BranchUniversalObject resBuo = BranchAndroidUtils.ToNativeBUO(universalObject);
     NativeBranch.RegisterView(resBuo, null);
 }
Ejemplo n.º 10
0
 public override void SendEvent(BranchEvent branchEvent)
 {
     BranchAndroidUtils.SendEvent(branchEvent, appContext);
 }
Ejemplo n.º 11
0
 public override BranchLinkProperties GetFirstReferringBranchLinkProperties()
 {
     return(new BranchLinkProperties(BranchAndroidUtils.ToDictionary(NativeBranch.FirstReferringParams)));
 }
Ejemplo n.º 12
0
 public override BranchUniversalObject GetFirstReferringBranchUniversalObject()
 {
     return(new BranchUniversalObject(BranchAndroidUtils.ToDictionary(NativeBranch.FirstReferringParams)));
 }
Ejemplo n.º 13
0
 public override Dictionary <String, object> GetFirstReferringParams()
 {
     return(BranchAndroidUtils.ToDictionary(NativeBranch.FirstReferringParams));
 }