Create new dot42 project
First, create a blank dot42 Application Project from Visual Studio 2010 Professional, Visual Studio 2012 Professional or the SharpDevelop edition that is included in the dot42 download.Parse Quickstart Guide
Login to your Parse account. If you haven't created an app yet, then Parse will make it very obvious how to do so. So I assume your first app as been created. Click 'Quickstart Guide' right after creating your app or click 'Quickstart' at the top of the dashboard.
First you must choose your platform. Make the following selections: Android, Native and Existing project.
1. Download the SDK
Follow the "SDK files for existing Android projects (.zip)" link.2. Import the zip file's contents into your existing Android project
Create a libs folder inside the dot42 project that we created at the very start. Copy "Parse-1.3.0.jar" from the zip archive the to the libs folder.Right-click the Project node and select 'Add Jar Reference...".
The following dialog shows:
3. Add the following using statement to your Activity:
using Com.Parse;Call Parse.initialize from your onCreate methods to set your application id and client key:
Parse.Initialize(this, "k1DM1............................d9RyrVu", "etaQb............................SJfz7Yh");
Make sure to copy your own keys here! Also notice how the Initialize is captitalized.
4. Request appropriate permissions
Your app must request the "INTERNET" and "ACCESS_NETWORK_STATE" permissions:[assembly: UsesPermission( Android.Manifest.Permission.INTERNET)] [assembly: UsesPermission( Android.Manifest.Permission.ACCESS_NETWORK_STATE)]
5. Track statistics around application opens
Add the following to the onCreate method of your main Activity:ParseAnalytics.TrackAppOpened(GetIntent());
After installing the SDK, copy and paste this code into your app, for example in your Application.onCreate:
ParseObject testObject = new ParseObject("TestObject"); testObject.Put("foo", "bar"); testObject.SaveInBackground();
No comments:
Post a Comment