-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing Xamarin Bindings version 1.0
- Loading branch information
Showing
150 changed files
with
2,938 additions
and
2 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,2 @@ | ||
*.DS_Store | ||
*~ |
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,4 @@ | ||
## 1.0 | ||
- Adds support for all standard API and UI functionality in the Android SDK and iOS SDKs. | ||
- iOS functionality not included in this release: IDFA collection, custom Slideup viewControllers, social data collection. | ||
- Please contact support@appboy.com for more information about these features and the timeline for their inclusion. |
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 |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# appboy-xamarin-bindings | ||
Xamarin bindings for the Appboy Android and iOS SDKs | ||
![Appboy Logo](http://www.appboy.com/assets/logo-cee4c217ff207f321cc7250f86a1037d.gif) | ||
|
||
# Xamarin Bindings SDK | ||
|
||
Successful marketing automation is essential to the future of your mobile app. Appboy helps you engage your users beyond the download. Visit the following links for details and we'll have you up and running in no time! | ||
|
||
- [Appboy Academy](http://www.appboy.com/academy "Appboy Academy") | ||
- [Technical Documentation](http://documentation.appboy.com "Appboy Technical Documentation") | ||
- [Android JavaDocs](http://appboy.github.io/appboy-android-sdk/javadocs/ "Appboy Android SDK Class Documentation") | ||
- [iOS Full Class Documentation](http://appboy.github.io/appboy-ios-sdk/docs/annotated.html "Appboy iOS SDK Class Documentation") | ||
|
||
## Components | ||
|
||
The format of this repository is that of a Xamarin component: under appboy-component you will find the directories src, | ||
libs, component, and samples. Libs, src, and samples each contain two directories, one for Android and one for iOS. The directories | ||
contains: | ||
|
||
- libs: the compiled DLL bindings for the Appboy SDKs. | ||
- src: the Xamarin bindings projects that generated the DLLs found in the libs folder. | ||
- samples: Xamarin applications that show how to use the bindings to access the Appboy feature set. | ||
- component: this contains the information required generate the Xamarin component found in the component store. This can | ||
generally be ignored, unless you are integrating the Xamarin component and want to see how it is generated. | ||
|
||
## Version Support | ||
|
||
The Android SDK supports Android 2.2+ (Froyo and up). The iOS SDK supports iOS 5.1.1+. | ||
|
||
## Questions? | ||
|
||
If you have questions, please contact [support@appboy.com](mailto:support@appboy.com). |
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,10 @@ | ||
# Appboy SDK Component Details | ||
|
||
This component contains Xamarin bindings for the Appboy Android and iOS SDKs. They are fully featured bindings and can use the full feature set of the Appboy SDKs. | ||
|
||
Most simply, [Appboy](https://appboy.com) enables clients to collect analytics and engage users. In practice, this includes a wide suite of customizeable analytics, the ability to segment users in intuitive and useful ways based on these analytics, and the ability to engage segments of users through multiple messaging channels utilizing robust message composers, smart AI-based delivery scheduling, a multivariate testing framework, and more. | ||
|
||
## Features | ||
|
||
- Log custom events, user data, device information, session data, location data, and more. | ||
- In-App messages, Push Notifications, Email, and the Appboy News Feed |
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 @@ | ||
### Quickstart | ||
|
||
To get started, create an [Appboy](https://appboy.com) account. See [our documentation](https://documentation.appboy.com/) for detailed instructions on how to integrate Appboy depending on your platform. | ||
|
||
## iOS | ||
|
||
First, set up an application in the Appboy dashboard. Then, within your `AppDelegate.cs` file, add the following snippet within your `FinishedLaunching` method: | ||
__Note__: Be sure to update `YOUR-API-KEY` with the correct value from your App Settings page in the Appboy dashboard. | ||
|
||
```csharp | ||
Appboy.StartWithApiKey ("YOUR-API-KEY", UIApplication.SharedApplication, options); | ||
``` | ||
|
||
See [our documentation](https://documentation.appboy.com/) for instructions on how to integrate further features. | ||
|
||
## Android | ||
|
||
First, set up an application in the Appboy dashboard. Then, to enable tracking of user sessions and the gathering of basic user data, add the following calls to the `onStart()` and `onStop()` lifecycle methods of __every__ Activity class in your app: | ||
|
||
```csharp | ||
protected override void onStart() { | ||
base.onStart(); | ||
Appboy.GetInstance(this).OpenSession(this); | ||
} | ||
``` | ||
|
||
```csharp | ||
protected override void onStop() { | ||
base.onStop(); | ||
Appboy.GetInstance(this).CloseSession(this); | ||
} | ||
``` | ||
|
||
__Note__: Ensure that you have ``using Com.Appboy;`` at the top of your Activity so that the Appboy class resolves. | ||
|
||
See [our documentation](https://documentation.appboy.com/) for instructions on how to integrate further features. |
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,9 @@ | ||
Copyright (c) 2014 Appboy, Inc. | ||
All rights reserved. | ||
|
||
* Use of source code or binaries contained within Appboy's Xamarin Component is permitted only to enable use of the Appboy platform by customers of Appboy. | ||
* Modification of source code and inclusion in mobile apps is explicitly allowed provided that all other conditions are met. | ||
* Neither the name of Appboy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
* Redistribution of source code or binaries is disallowed except with specific prior written permission. Any such redistribution must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
%YAML 1.2 | ||
--- | ||
name: Appboy SDK Bindings | ||
id: appboy-sdk-bindings | ||
publisher: Appboy | ||
license: License.md | ||
icons: | ||
- appboy-sdk-bindings_128x128.png | ||
- appboy-sdk-bindings_512x512.png | ||
publisher-url: http://appboy.com | ||
libraries: | ||
ios-unified: ../lib/ios-unified/AppboyPlatformXamariniOSBinding.dll | ||
android: ../lib/android/AppboyPlatform.AndroidBinding.dll | ||
summary: Xamarin bindings for the Appboy SDKs. | ||
details: Details.md | ||
getting-started: GettingStarted.md | ||
version: "1.0" | ||
source: | ||
../src/AppboyBindings.sln | ||
samples: | ||
Android Sample: ../samples/android/Android.sln | ||
iOS Sample: ../samples/ios-unified/iOS.sln | ||
packages: | ||
android: Xamarin.Android.Support.v4, Version=21.0.3.0 |
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,2 @@ | ||
Xamarin.Android.Support.v4.dll | ||
*mdb |
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+34.5 KB
appboy-component/lib/ios-unified/AppboyPlatformXamariniOSBinding.dll.mdb
Binary file not shown.
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,29 @@ | ||
# user specific files | ||
*.pidb | ||
*.userprefs | ||
*.swp | ||
*.DS_Store | ||
*.suo | ||
*.user | ||
*.pfx | ||
|
||
# emacs temporary files | ||
*~ | ||
|
||
# generated files | ||
*/bin/* | ||
*/obj/* | ||
*/*/bin/* | ||
*/*/obj/* | ||
*/*/*/bin/* | ||
*/*/*/obj/* | ||
*_ReSharper.*/ | ||
|
||
# resource files | ||
*/*/Resource.designer.cs | ||
*/*/*/Resource.designer.cs | ||
*/*/*/*/Resource.designer.cs | ||
|
||
# nuget and component packges | ||
packages/ | ||
Components/ |
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,48 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp.XamarinAndroid", "TestApp.XamarinAndroid\TestApp.XamarinAndroid.csproj", "{3C7ED4C3-81AB-4492-8B0A-0DB7777445CB}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppboyPlatform.XamarinAndroidBinding", "..\..\src\android\AppboyPlatform.XamarinAndroidBinding.csproj", "{9038A212-68E1-4C7A-B029-94F5C8FE76E9}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{3C7ED4C3-81AB-4492-8B0A-0DB7777445CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3C7ED4C3-81AB-4492-8B0A-0DB7777445CB}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3C7ED4C3-81AB-4492-8B0A-0DB7777445CB}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3C7ED4C3-81AB-4492-8B0A-0DB7777445CB}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{9038A212-68E1-4C7A-B029-94F5C8FE76E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9038A212-68E1-4C7A-B029-94F5C8FE76E9}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9038A212-68E1-4C7A-B029-94F5C8FE76E9}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9038A212-68E1-4C7A-B029-94F5C8FE76E9}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(MonoDevelopProperties) = preSolution | ||
Policies = $0 | ||
$0.TextStylePolicy = $1 | ||
$1.FileWidth = 120 | ||
$1.TabWidth = 2 | ||
$1.IndentWidth = 2 | ||
$1.inheritsSet = VisualStudio | ||
$1.inheritsScope = text/plain | ||
$1.scope = text/x-csharp | ||
$0.CSharpFormattingPolicy = $2 | ||
$2.AfterDelegateDeclarationParameterComma = True | ||
$2.inheritsSet = Mono | ||
$2.inheritsScope = text/x-csharp | ||
$2.scope = text/x-csharp | ||
$0.DotNetNamingPolicy = $3 | ||
$3.DirectoryNamespaceAssociation = None | ||
$3.ResourceNamePolicy = FileFormatDefault | ||
$0.TextStylePolicy = $4 | ||
$4.FileWidth = 120 | ||
$4.TabWidth = 2 | ||
$4.IndentWidth = 2 | ||
$4.inheritsSet = VisualStudio | ||
$4.inheritsScope = text/plain | ||
$4.scope = text/plain | ||
EndGlobalSection | ||
EndGlobal |
57 changes: 57 additions & 0 deletions
57
appboy-component/samples/android/TestApp.XamarinAndroid/AppboyBroadcastReceiver.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,57 @@ | ||
| ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
using Android.App; | ||
using Android.Content; | ||
using Android.OS; | ||
using Android.Runtime; | ||
using Android.Views; | ||
using Android.Widget; | ||
|
||
namespace com.appboy.xamarinsample | ||
{ | ||
[BroadcastReceiver] | ||
public class AppboyBroadcastReceiver : BroadcastReceiver | ||
{ | ||
public const String SOURCE_KEY = "source"; | ||
|
||
public override void OnReceive (Context context, Intent intent) | ||
{ | ||
String packageName = context.PackageName; | ||
String pushReceivedAction = packageName + ".intent.APPBOY_PUSH_RECEIVED"; | ||
String notificationOpenedAction = packageName + ".intent.APPBOY_NOTIFICATION_OPENED"; | ||
String action = intent.Action; | ||
|
||
if (pushReceivedAction == action) { | ||
Console.WriteLine ("Received push notification"); | ||
} else if (notificationOpenedAction == action) { | ||
Bundle extras = new Bundle (); | ||
extras.PutString (Com.Appboy.Constants.AppboyPushCampaignIdKey, intent.GetStringExtra (Com.Appboy.Constants.AppboyPushCampaignIdKey)); | ||
|
||
if (intent.GetStringExtra ("uri") != null) { | ||
Intent uriIntent = new Intent(Intent.ActionView, Android.Net.Uri.Parse(intent.GetStringExtra("uri"))); | ||
TaskStackBuilder stackBuilder = TaskStackBuilder.Create(context); | ||
stackBuilder.AddNextIntent(getStartActivityIntent(context, extras)); | ||
stackBuilder.AddNextIntent(uriIntent); | ||
stackBuilder.StartActivities(extras); | ||
} else { | ||
context.StartActivity (getStartActivityIntent (context, extras)); | ||
} | ||
} | ||
} | ||
|
||
private Intent getStartActivityIntent(Context context, Bundle extras) { | ||
Intent startActivityIntent = new Intent(context, typeof(MainActivity)); | ||
startActivityIntent.SetFlags(ActivityFlags.NewTask | ActivityFlags.ClearTop | ActivityFlags.SingleTop); | ||
startActivityIntent.PutExtra(SOURCE_KEY, Com.Appboy.Constants.Appboy); | ||
if (extras != null) { | ||
startActivityIntent.PutExtras(extras); | ||
} | ||
return startActivityIntent; | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.