Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/2.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea.calegari authored and andrea.calegari committed Nov 16, 2017
2 parents 8ee3387 + b25b1fa commit aa53bd9
Show file tree
Hide file tree
Showing 141 changed files with 10,799 additions and 1,709 deletions.
19 changes: 19 additions & 0 deletions .gitignore
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
21 changes: 21 additions & 0 deletions bridge/.gitignore
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 bridge/Droid/XamarinBridge.Droid/Adapter/AdapterContent.cs
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;
}
}
}
25 changes: 25 additions & 0 deletions bridge/Droid/XamarinBridge.Droid/Adapter/AdapterCoupon.cs
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;
}
}
}
20 changes: 20 additions & 0 deletions bridge/Droid/XamarinBridge.Droid/Adapter/AdapterCustom.cs
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 bridge/Droid/XamarinBridge.Droid/Adapter/AdapterFeedback.cs
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;
}
}
}
19 changes: 19 additions & 0 deletions bridge/Droid/XamarinBridge.Droid/Adapter/AdapterSimple.cs
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;
}
}
}
19 changes: 19 additions & 0 deletions bridge/Droid/XamarinBridge.Droid/Assets/AboutAssets.txt
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");
Loading

0 comments on commit aa53bd9

Please sign in to comment.