This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
141 changed files
with
10,799 additions
and
1,709 deletions.
There are no files selected for viewing
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,19 @@ | ||
# Build results | ||
[Dd]ebug/ | ||
[Dd]ebugPublic/ | ||
[Rr]elease/ | ||
x64/ | ||
build/ | ||
bld/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# NuGet Packages Directory | ||
packages/ | ||
|
||
# User-specific files | ||
*.userprefs | ||
|
||
Keys.plist | ||
*secrets.xml | ||
*Keys.plist |
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,21 @@ | ||
# Build results | ||
[Dd]ebug/ | ||
[Dd]ebugPublic/ | ||
[Rr]elease/ | ||
x64/ | ||
build/ | ||
bld/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# NuGet Packages Directory | ||
packages/ | ||
|
||
# User-specific files | ||
*.userprefs | ||
|
||
#dll | ||
*.dll | ||
|
||
Keys.plist | ||
*secrets.xml |
25 changes: 25 additions & 0 deletions
25
bridge/Droid/XamarinBridge.Droid/Adapter/AdapterContent.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,25 @@ | ||
using System; | ||
using IT.Near.Sdk.Reactions.Contentplugin.Model; | ||
using XamarinBridge.PCL.Types; | ||
|
||
namespace XamarinBridge.Droid.Adapter | ||
{ | ||
public class AdapterContent | ||
{ | ||
public static XCContentNotification GetCommonType(Content ContentNotification) | ||
{ | ||
XCContentNotification XContent = new XCContentNotification(); | ||
|
||
XContent.NotificationMessage = ContentNotification.NotificationMessage; | ||
XContent.Title = ContentNotification.Title; | ||
XContent.Content = ContentNotification.ContentString; | ||
XContent.ImageLink.FullSize = ContentNotification.ImageLink.FullSize; | ||
XContent.ImageLink.SmallSize = ContentNotification.ImageLink.SmallSize; | ||
XContent.Cta.Label = ContentNotification.Cta.Label; | ||
XContent.Cta.Url = ContentNotification.Cta.Url; | ||
XContent.Id = ContentNotification.Id; | ||
|
||
return XContent; | ||
} | ||
} | ||
} |
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,25 @@ | ||
using System; | ||
using IT.Near.Sdk.Reactions.Couponplugin.Model; | ||
using XamarinBridge.PCL.Types; | ||
|
||
namespace XamarinBridge.Droid.Adapter | ||
{ | ||
public class AdapterCoupon | ||
{ | ||
public static XCCouponNotification GetCommonType(Coupon CouponNotification) | ||
{ | ||
XCCouponNotification XCoupon = new XCCouponNotification(); | ||
|
||
XCoupon.NotificationMessage = CouponNotification.NotificationMessage; | ||
XCoupon.Description = CouponNotification.Description; | ||
XCoupon.Value = CouponNotification.Value; | ||
XCoupon.ExpiresAt = CouponNotification.ExpiresAt; | ||
XCoupon.ReedemableFrom = CouponNotification.RedeemableFrom; | ||
XCoupon.IconSet.FullSize = CouponNotification.IconSet.FullSize; | ||
XCoupon.IconSet.SmallSize = CouponNotification.IconSet.SmallSize; | ||
XCoupon.Id = CouponNotification.Id; | ||
|
||
return XCoupon; | ||
} | ||
} | ||
} |
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,20 @@ | ||
using System; | ||
using XamarinBridge.PCL.Types; | ||
using IT.Near.Sdk.Reactions.Customjsonplugin.Model; | ||
|
||
namespace XamarinBridge.Droid.Adapter | ||
{ | ||
public class AdapterCustom | ||
{ | ||
public static XCCustomJSONNotification GetCommonType(CustomJSON CustomJSONNotification) | ||
{ | ||
XCCustomJSONNotification XCustomJSON = new XCCustomJSONNotification(); | ||
|
||
XCustomJSON.NotificationMessage = CustomJSONNotification.NotificationMessage; | ||
XCustomJSON.Content = (System.Collections.Generic.Dictionary<string, object>)CustomJSONNotification.Content; | ||
XCustomJSON.Id = CustomJSONNotification.Id; | ||
|
||
return XCustomJSON; | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
bridge/Droid/XamarinBridge.Droid/Adapter/AdapterFeedback.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,33 @@ | ||
using System; | ||
using XamarinBridge.PCL.Types; | ||
using IT.Near.Sdk.Reactions.Feedbackplugin.Model; | ||
|
||
namespace XamarinBridge.Droid.Adapter | ||
{ | ||
public class AdapterFeedback | ||
{ | ||
public static Feedback GetNative(XCFeedbackNotification xfeed) | ||
{ | ||
Feedback native = new Feedback(); | ||
|
||
native.NotificationMessage = xfeed.NotificationMessage; | ||
native.Question = xfeed.Question; | ||
native.RecipeId = xfeed.RecipeId; | ||
native.Id = xfeed.Id; | ||
|
||
return native; | ||
} | ||
|
||
public static XCFeedbackNotification GetCommonType(Feedback native) | ||
{ | ||
XCFeedbackNotification xfeed = new XCFeedbackNotification(); | ||
|
||
xfeed.NotificationMessage = native.NotificationMessage; | ||
xfeed.Question = native.Question; | ||
xfeed.RecipeId = native.RecipeId; | ||
xfeed.Id = native.Id; | ||
|
||
return xfeed; | ||
} | ||
} | ||
} |
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,19 @@ | ||
using System; | ||
using XamarinBridge.PCL.Types; | ||
using IT.Near.Sdk.Reactions.Simplenotificationplugin.Model; | ||
|
||
namespace XamarinBridge.Droid.Adapter | ||
{ | ||
public class AdapterSimple | ||
{ | ||
public static XCSimpleNotification GetCommonType(SimpleNotification SimpleNotification) | ||
{ | ||
XCSimpleNotification XSimple = new XCSimpleNotification(); | ||
|
||
XSimple.NotificationMessage = SimpleNotification.NotificationMessage; | ||
XSimple.Id = SimpleNotification.Id; | ||
|
||
return XSimple; | ||
} | ||
} | ||
} |
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,19 @@ | ||
Any raw assets you want to be deployed with your application can be placed in | ||
this directory (and child directories) and given a Build Action of "AndroidAsset". | ||
|
||
These files will be deployed with your package and will be accessible using Android's | ||
AssetManager, like this: | ||
|
||
public class ReadAsset : Activity | ||
{ | ||
protected override void OnCreate (Bundle bundle) | ||
{ | ||
base.OnCreate (bundle); | ||
|
||
InputStream input = Assets.Open ("my_asset.txt"); | ||
} | ||
} | ||
|
||
Additionally, some Android functions will automatically load asset files: | ||
|
||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); |
Oops, something went wrong.