-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed shared dependency * Remove faulty cross-platform code. Prep for 6.2.x releases * Version bump to 6.0.3
- Loading branch information
1 parent
da1fffc
commit 27b710c
Showing
48 changed files
with
1,030 additions
and
1,201 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
using System; | ||
using LocalyticsSample.Shared; | ||
using LocalyticsXamarin.Common; | ||
using LocalyticsXamarin.Shared; | ||
|
||
|
||
[assembly: Xamarin.Forms.Dependency(typeof(LocalyticsSample.Shared.LocalyticsXamarinForms))] | ||
namespace LocalyticsSample.Shared | ||
{ | ||
public class LocalyticsXamarinForms : LocalyticsSDK, ILocalytics, IPlatform | ||
{ | ||
protected bool inappShouldDisplay = true; | ||
protected bool placesShouldDisplay = true; | ||
protected bool shouldDeepLink = true; | ||
|
||
public void SetPlacesShouldDisplay(bool display) | ||
{ | ||
placesShouldDisplay = display; | ||
} | ||
|
||
public void SetInAppShouldDisplay(bool display) | ||
{ | ||
inappShouldDisplay = display; | ||
} | ||
|
||
public void SetShouldDeeplink(bool display) | ||
{ | ||
shouldDeepLink = display; | ||
} | ||
|
||
|
||
public virtual bool InAppShouldShowHandler(object inAppCampaign) { return true; } | ||
public virtual bool PlacesShouldDisplay(object placesCampaign) { return true; } | ||
|
||
public bool ShouldDeepLinkHandler(string url) | ||
{ | ||
// Console.WriteLine("XamarinEvent ShouldDeepLink Url:{0}", url); | ||
return shouldDeepLink; | ||
} | ||
|
||
public virtual void RegisterEvents() | ||
{ | ||
LocalyticsSDK.LocalyticsDidTriggerRegions += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent LocalyticsDidTriggerRegions " + e); | ||
}; | ||
|
||
LocalyticsSDK.LocalyticsDidUpdateLocation += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent LocalyticsDidUpdateLocation " + e); | ||
}; | ||
|
||
LocalyticsSDK.LocalyticsDidUpdateMonitoredGeofences += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent LocalyticsDidUpdateMonitoredGeofences " + e); | ||
}; | ||
|
||
// Analytics Events | ||
LocalyticsSDK.LocalyticsSessionDidOpen += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent SessionDidOpenEvent: " + e); | ||
}; | ||
|
||
LocalyticsSDK.LocalyticsDidTagEvent += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent SessionDidTagEvent: " + e); | ||
}; | ||
|
||
LocalyticsSDK.LocalyticsSessionWillClose += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent SessionWillCloseEvent: " + e); | ||
}; | ||
|
||
LocalyticsSDK.LocalyticsSessionWillOpen += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent SessionWillOpenEvent: " + e); | ||
}; | ||
|
||
LocalyticsSDK.InAppDidDismissEvent += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent InAppDidDismissEvent " + e); | ||
}; | ||
|
||
LocalyticsSDK.InAppDidDisplayEvent += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent InAppDidDisplayEvent " + e); | ||
}; | ||
|
||
LocalyticsSDK.InAppWillDismissEvent += (sender, e) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent InAppWillDismissEvent " + e); | ||
}; | ||
|
||
LocalyticsSDK.InAppWillDisplayDelegate = (campaign, configuration) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent LocalyticsWillDisplayInAppMessage " + campaign + "," + configuration); | ||
return configuration; | ||
}; | ||
|
||
LocalyticsSDK.CallToActionShouldDeepLinkDelegate = (string deeplink, ICampaignBase campaign) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent LocalyticsCallToActionShouldDeepLinkDelegate " + deeplink + "," + campaign); | ||
return true; | ||
}; | ||
|
||
LocalyticsSDK.DidOptOut = (object sender, DidOptOutEventArgs optOutEventArgs) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent LocalyticsDidOptOut " + optOutEventArgs); | ||
}; | ||
|
||
LocalyticsSDK.DidPrivacyOptOut = (object sender, DidOptOutEventArgs optOutEventArgs) => | ||
{ | ||
System.Diagnostics.Debug.WriteLine("XamarinEvent LocalyticsDidPrivacyOptOut " + optOutEventArgs); | ||
}; | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
LocalyticsXamarin/Android/LocalyticsXamarinFormsAndroid.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using LocalyticsXamarin.Android; | ||
|
||
[assembly: Xamarin.Forms.Dependency(typeof(LocalyticsSample.Shared.LocalyticsXamarinForms))] | ||
namespace LocalyticsSample.Shared | ||
{ | ||
public class LocalyticsXamarinFormsAndroid : LocalyticsXamarinForms | ||
{ | ||
|
||
public bool InAppShouldShowHandler(InAppCampaign inAppCampaign) | ||
{ | ||
Console.WriteLine("XamarinEvent LLInAppCampaign campaign:{0}", (InAppCampaign)inAppCampaign); | ||
return inappShouldDisplay; | ||
} | ||
|
||
public bool PlacesShouldDisplay(PlacesCampaign placesCampaign) | ||
{ | ||
Console.WriteLine("XamarinEvent PlacesShouldDisplay campaign:{0}", (PlacesCampaign)placesCampaign); | ||
return placesShouldDisplay; | ||
} | ||
|
||
|
||
public override void RegisterEvents() | ||
{ | ||
base.RegisterEvents(); | ||
|
||
// LocalyticsSDK.InAppShouldShowDelegate = InAppShouldShowHandler; | ||
// LocalyticsSDK.ShouldDeepLinkDelegate = ShouldDeepLinkHandler; | ||
|
||
Localytics.ShouldPromptForLocationPermission = (Campaign campaign) => { | ||
Console.WriteLine("XamarinEvent LocalyticsShouldPromptForLocationPermission " + campaign); | ||
return true; | ||
}; | ||
} | ||
} | ||
} |
19 changes: 0 additions & 19 deletions
19
LocalyticsXamarin/LocalyticsMessagingSample.Android/Assets/AboutAssets.txt
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
LocalyticsXamarin/LocalyticsMessagingSample.Android/InboxActivity.cs
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
LocalyticsXamarin/LocalyticsMessagingSample.Android/InboxDetailActivity.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.