Skip to content

Commit cc54f69

Browse files
AWS SDK for Unity 2.0.0.1
1 parent 2ab193e commit cc54f69

39 files changed

+637
-43
lines changed

Cognito Sync/CognitoSyncManagerSample.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Copyright 2014-2015 Amazon.com,
33
// Inc. or its affiliates. All Rights Reserved.
44
//
5-
// Licensed under the Amazon Software License (the "License").
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
67
// You may not use this file except in compliance with the
78
// License. A copy of the License is located
89
// in the "license" file accompanying this file. This file is
0 Bytes
Binary file not shown.

Cognito Sync/readme.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# Amazon Cognito Sync sample
2-
3-
4-
5-
This sample shows how to store data in the cloud using Amazon Cognito Sync. The sample demonstrates storing two text fields: player name and player alias.
6-
7-
#####Configure the Cognito Sync Sample
8-
1. Open the CognitoSyncManagerSample scene file.
9-
2. Click "CognitoSyncManagerSample" game object in "Hierarchy Pane".
10-
3. Add "Identity Pool Id" in "Inspector Pane". A pool can be created in the [Cognito console]( https://console.aws.amazon.com/cognito/home).
11-
12-
#####Run the sample scene
13-
1. Click the "Run" button.
14-
15-
2. When the "Save offline" button is pressed, the two fields are stored in a Cognito Sync dataset, but not pushed to the cloud yet. This is the way you persist data locally.
16-
17-
3. The "Sync with Amazon Cognito" button will synchronize (push and/or pull) the changes between your local dataset and the cloud.
18-
19-
4. "Delete local data" will wipe the local dataset, but you will still be able to recover the data from the cloud by synchronizing.
1+
# Amazon Cognito Sync sample
2+
3+
4+
5+
This sample shows how to store data in the cloud using Amazon Cognito Sync. The sample demonstrates storing two text fields: player name and player alias.
6+
7+
#####Configure the Cognito Sync Sample
8+
1. Open the CognitoSyncManagerSample scene file.
9+
2. Click "CognitoSyncManagerSample" game object in "Hierarchy Pane".
10+
3. Add "Identity Pool Id" in "Inspector Pane". A pool can be created in the [Cognito console]( https://console.aws.amazon.com/cognito/home).
11+
12+
#####Run the sample scene
13+
1. Click the "Run" button.
14+
15+
2. When the "Save offline" button is pressed, the two fields are stored in a Cognito Sync dataset, but not pushed to the cloud yet. This is the way you persist data locally.
16+
17+
3. The "Sync with Amazon Cognito" button will synchronize (push and/or pull) the changes between your local dataset and the cloud.
18+
19+
4. "Delete local data" will wipe the local dataset, but you will still be able to recover the data from the cloud by synchronizing.

DynamoDB/DynamoDBBaseExample.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Copyright 2014-2015 Amazon.com,
33
// Inc. or its affiliates. All Rights Reserved.
44
//
5-
// Licensed under the Amazon Software License (the "License").
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
67
// You may not use this file except in compliance with the
78
// License. A copy of the License is located
89
// in the "license" file accompanying this file. This file is
@@ -11,6 +12,7 @@
1112
// for the specific language governing permissions and
1213
// limitations under the License.
1314
//
15+
1416
using UnityEngine;
1517
using System.Collections;
1618
using Amazon.DynamoDBv2;

DynamoDB/DynamoDBExample.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Copyright 2014-2015 Amazon.com,
33
// Inc. or its affiliates. All Rights Reserved.
44
//
5-
// Licensed under the Amazon Software License (the "License").
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
67
// You may not use this file except in compliance with the
78
// License. A copy of the License is located
89
// in the "license" file accompanying this file. This file is
@@ -11,6 +12,7 @@
1112
// for the specific language governing permissions and
1213
// limitations under the License.
1314
//
15+
1416
using UnityEngine;
1517
using System.Collections;
1618
using Amazon.DynamoDBv2;

DynamoDB/DynamoDBExample.unity

0 Bytes
Binary file not shown.

DynamoDB/HighLevelExample.unity

0 Bytes
Binary file not shown.

DynamoDB/HighLevelTableExample.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Copyright 2014-2015 Amazon.com,
33
// Inc. or its affiliates. All Rights Reserved.
44
//
5-
// Licensed under the Amazon Software License (the "License").
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
67
// You may not use this file except in compliance with the
78
// License. A copy of the License is located
89
// in the "license" file accompanying this file. This file is
@@ -11,6 +12,7 @@
1112
// for the specific language governing permissions and
1213
// limitations under the License.
1314
//
15+
1416
using UnityEngine;
1517
using System.Collections;
1618
using Amazon.DynamoDBv2.DataModel;
0 Bytes
Binary file not shown.

DynamoDB/LowLevelTableExample.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Copyright 2014-2015 Amazon.com,
33
// Inc. or its affiliates. All Rights Reserved.
44
//
5-
// Licensed under the Amazon Software License (the "License").
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
67
// You may not use this file except in compliance with the
78
// License. A copy of the License is located
89
// in the "license" file accompanying this file. This file is
@@ -11,6 +12,7 @@
1112
// for the specific language governing permissions and
1213
// limitations under the License.
1314
//
15+
1416
using UnityEngine;
1517
using System.Collections;
1618
using UnityEngine.UI;

DynamoDB/TableQueryAndScanExample.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Copyright 2014-2015 Amazon.com,
33
// Inc. or its affiliates. All Rights Reserved.
44
//
5-
// Licensed under the Amazon Software License (the "License").
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
67
// You may not use this file except in compliance with the
78
// License. A copy of the License is located
89
// in the "license" file accompanying this file. This file is
@@ -11,6 +12,7 @@
1112
// for the specific language governing permissions and
1213
// limitations under the License.
1314
//
15+
1416
using UnityEngine;
1517
using System.Collections;
1618
using UnityEngine.UI;
-16 Bytes
Binary file not shown.

Mobile Analytics/AmazonMobileAnalyticsSample.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Copyright 2014-2015 Amazon.com,
33
// Inc. or its affiliates. All Rights Reserved.
44
//
5-
// Licensed under the Amazon Software License (the "License").
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
67
// You may not use this file except in compliance with the
78
// License. A copy of the License is located
89
// in the "license" file accompanying this file. This file is
@@ -11,6 +12,7 @@
1112
// for the specific language governing permissions and
1213
// limitations under the License.
1314
//
15+
1416
using Amazon.CognitoIdentity;
1517
using Amazon.MobileAnalytics.MobileAnalyticsManager;
1618
using Amazon.Util.Internal;
Binary file not shown.

Mobile Analytics/readme.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
#AWS SDK for Unity Mobile Analytics Sample
2-
3-
###How to Run the Amazon Mobile Analytics Unity Sample
4-
5-
#####Setting up the SDk and Samples
6-
1. After importing the aws-sdk-unity-mobile-analytics-x.x.x.x.unitypackage, In the Project window, navigate to the AWSSDK/examples/Mobile Analytics folder.
7-
2. Open the scene called AmazonMobileAnalyticsSample.
8-
3. Click on the AmazonMobileAnalyticsSample game object.
9-
4. Specify your App Id (created in the Amazon Mobile Analytics console at https://console.aws.amazon.com/mobileanalytics/home/?region=us-east-1#/overview?consoleState=management) in the "App Id" field.
10-
5. Specify your Cognito Identity Pool Id (created using the Cognito console at https://console.aws.amazon.com/cognito/home?region=us-east-1#) in the "Cognito Identity Pool Id" field.
11-
12-
#####Run the sample scene
13-
1. Click the "Run" button.
14-
2. In the game view, you can press two buttons. One will record a custom event and the other will record a monetization event. The sample records session events in the OnApplicationFocus method of the AmazonMobileAnalyticsSample class.
15-
Note: The AWS Mobile Unity SDK sends events every 60 seconds. After clicking on one of the buttons to record an event, you need to wait up to 60 seconds for the events to be delivered (you should see a console message stating successful delivery when this happens). Once sent, it will take up to an hour for the events to show up on the Amazon Mobile Analytics console.
16-
1+
#AWS SDK for Unity Mobile Analytics Sample
2+
3+
###How to Run the Amazon Mobile Analytics Unity Sample
4+
5+
#####Setting up the SDk and Samples
6+
1. After importing the aws-sdk-unity-mobile-analytics-x.x.x.x.unitypackage, In the Project window, navigate to the AWSSDK/examples/Mobile Analytics folder.
7+
2. Open the scene called AmazonMobileAnalyticsSample.
8+
3. Click on the AmazonMobileAnalyticsSample game object.
9+
4. Specify your App Id (created in the Amazon Mobile Analytics console at https://console.aws.amazon.com/mobileanalytics/home/?region=us-east-1#/overview?consoleState=management) in the "App Id" field.
10+
5. Specify your Cognito Identity Pool Id (created using the Cognito console at https://console.aws.amazon.com/cognito/home?region=us-east-1#) in the "Cognito Identity Pool Id" field.
11+
12+
#####Run the sample scene
13+
1. Click the "Run" button.
14+
2. In the game view, you can press two buttons. One will record a custom event and the other will record a monetization event. The sample records session events in the OnApplicationFocus method of the AmazonMobileAnalyticsSample class.
15+
Note: The AWS Mobile Unity SDK sends events every 60 seconds. After clicking on one of the buttons to record an event, you need to wait up to 60 seconds for the events to be delivered (you should see a console message stating successful delivery when this happens). Once sent, it will take up to an hour for the events to show up on the Amazon Mobile Analytics console.
16+

Mobile Analytics/readme.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
How to Run the Amazon Mobile Analytics Unity Sample
2+
This sample demonstrates how to use Amazon Mobile Analytics with the AWS Mobile SDK for Unity.
3+
4+
Step 1: Load and configure the sample scene in the Unity editor
5+
1. Unzip the AWS Unity SDK package to a folder on your computer.
6+
2. With your project open in the Unity Editor, select Assets/Import Package/Custom Package...
7+
3. In the Import Package file selection dialog, navigate to the unity packages subfolder and open the aws-unity-sdk-x.x.x-MobileAnalytics.unitypackage.
8+
4. In the subsequent "Importing Package" dialog, ensure all the items are selected and then click on the "Import" button.
9+
5. In the Project window, navigate to the AWSUnitySDKSample/MobileAnalytics folder.
10+
6. Open the scene called AmazonMobileAnalyticsSample.
11+
7. Click on the AmazonMobileAnalyticsSample game object.
12+
8. Specify your App Id (created in the Amazon Mobile Analytics console at https://console.aws.amazon.com/mobileanalytics/home/?region=us-east-1#/overview?consoleState=management) in the "App Id" field.
13+
9. Specify your Cognito Identity Pool Id (created using the Cognito console at https://console.aws.amazon.com/cognito/home?region=us-east-1#) in the "Cognito Identity Pool Id" field.
14+
15+
16+
Step 2: Run the sample scene
17+
1. Click the "Run" button.
18+
2. In the game view, you can press two buttons. One will record a custom event and the other will record a monetization event. The sample records session events in the OnApplicationFocus method of the AmazonMobileAnalyticsSample class.
19+
Note: The AWS Mobile Unity SDK sends events every 60 seconds. After clicking on one of the buttons to record an event, you need to wait up to 60 seconds for the events to be delivered (you should see a console message stating successful delivery when this happens). Once sent, it will take up to an hour for the events to show up on the Amazon Mobile Analytics console.
20+

Mobile Analytics/readme.txt.meta

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

S3/S3Example.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Copyright 2014-2015 Amazon.com,
33
// Inc. or its affiliates. All Rights Reserved.
44
//
5-
// Licensed under the Amazon Software License (the "License").
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
67
// You may not use this file except in compliance with the
78
// License. A copy of the License is located
89
// in the "license" file accompanying this file. This file is
@@ -11,6 +12,7 @@
1112
// for the specific language governing permissions and
1213
// limitations under the License.
1314
//
15+
1416
using UnityEngine;
1517
using System.Collections;
1618
using UnityEngine.UI;

S3/S3Example.unity

0 Bytes
Binary file not shown.

SNS/GCM.cs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
//
2+
// Copyright 2014-2015 Amazon.com,
3+
// Inc. or its affiliates. All Rights Reserved.
4+
//
5+
// Licensed under the AWS Mobile SDK For Unity
6+
// Sample Application License Agreement (the "License").
7+
// You may not use this file except in compliance with the
8+
// License. A copy of the License is located
9+
// in the "license" file accompanying this file. This file is
10+
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11+
// CONDITIONS OF ANY KIND, express or implied. See the License
12+
// for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
16+
using System;
17+
using System.Collections.Generic;
18+
using System.Linq;
19+
using System.Text;
20+
using UnityEngine;
21+
22+
namespace AWSSDK.Examples
23+
{
24+
public class GCM
25+
{
26+
//namepsaced java class name which will be invoked
27+
private const string CLASS_NAME = "com.amazonaws.unity.AWSUnityGCMWrapper";
28+
29+
public static void Register(Action<string> OnRegisterCallback,params string[] senderId)
30+
{
31+
#if UNITY_ANDROID
32+
using(AndroidJavaClass cls = new AndroidJavaClass(CLASS_NAME))
33+
{
34+
string senderIds = string.Join(",",senderId);
35+
string regId = cls.CallStatic<string>("register",senderIds);
36+
Debug.Log("regId = " + regId);
37+
if (OnRegisterCallback != null)
38+
OnRegisterCallback(regId);
39+
}
40+
#endif
41+
}
42+
43+
public static void Unregister()
44+
{
45+
#if UNITY_ANDROID
46+
if (Application.platform == RuntimePlatform.Android)
47+
{
48+
using (AndroidJavaClass cls = new AndroidJavaClass(CLASS_NAME))
49+
{
50+
cls.CallStatic("unregister");
51+
}
52+
}
53+
#endif
54+
}
55+
}
56+
}

SNS/GCM.cs.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)