How to
An XML file is used to describe currently available jobs openings. All valid tags are described below. Tag names must be given exactly as below, in English, while text in tag values can be given in any language, using UTF-8 encoding.
See the sample feed below for a complete working example.
Note that all string tags must have their values wrapped as CDATA.
You can set up your app to use the Spaces SDK for Android in the following ways:
- By using the Quick Start.
- By setting up your project with the Spaces SDK for Android.
Quick Start
To get a Spaces App ID, configure your app's settings, and import the Spaces SDK for Android, click here and follow the instructions.
Before You Start
You will need:
- Your Spaces App ID
- Your Spaces App Client Token
Android Studio Setup
Create Your Project
To use the Spaces SDK in an Android Studio project, add the SDK as a build dependency and import the SDK.
- Go to Android Studio | New Project | Minimum SDK.
- Select API 15: Android 4.0.3 (IceCreamSandwich) or higher and create your new project.
- Open the file
Gradle Scripts | build.gradle (Project: <your_project>)and add the following:
mavenCentral()
- Save and close the
build.gradle (Project: <your_project>)file. - Open the file
Gradle Scripts | build.gradle (Module: app)and add the following to thedependenciessection:
implementation 'com.spaces.android:spaces-android-sdk:latest.release'
- Save and close the
build.gradle (Module: app)file. - Build your project. Now you can import com.spaces.androidsdk into your app.
Update Your Manifest
Add your App ID and Client Token to your project's string file and update the manifest file. Do the following:
- Open the
/app/res/values/strings.xmlfile in your app project. - Add string elements with the names spaces_app_id and spaces_client_token, and set the values to your App ID and Client Token. For example, if your app ID is 1234 and your client token is 56789 your code looks like the following:
<string name="spaces_app_id">1234</string>
<string name="spaces_client_token">56789</string>
- Open the
/app/manifests/AndroidManifest.xmlfile in your app project. - Add meta-data elements to the application element for your app ID and client token:
<application android:label="@string/app_name" ...>
...
<meta-data android:name="com.spaces.sdk.ApplicationID" android:value="@string/spaces_app_id"/>
<meta-data android:name="com.spaces.sdk.ClientToken" android:value="@string/spaces_client_token"/>
...
</application>
- Add a uses-permission element to the manifest after the application element:
<uses-permission android:name="android.permission.INTERNET"/>
- Build your project.