Skip to content
This repository was archived by the owner on Jul 27, 2019. It is now read-only.

Commit dbf9d08

Browse files
committed
Merge pull request #1 from CreativeSDK/ash/getting-started
Ash/getting started
2 parents 78b8e25 + 321d6c7 commit dbf9d08

File tree

7 files changed

+132
-3
lines changed

7 files changed

+132
-3
lines changed

getting-started/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
.DS_Store
77
/build
88
/captures
9+
10+
/app/src/main/java/com/adobe/gettingstarted/Keys.java

getting-started/.idea/misc.xml

Lines changed: 28 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

getting-started/app/build.gradle

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
apply plugin: 'com.android.application'
22

3+
/* 1) Apply the Gradle Retrolambda Plugin */
4+
apply plugin: 'me.tatarka.retrolambda'
5+
36
android {
47
compileSdkVersion 23
58
buildToolsVersion "23.0.2"
69

710
defaultConfig {
811
applicationId "com.adobe.gettingstarted"
9-
minSdkVersion 16
12+
minSdkVersion 16 // Minimum is 16
1013
targetSdkVersion 23
1114
versionCode 1
1215
versionName "1.0"
@@ -17,11 +20,31 @@ android {
1720
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1821
}
1922
}
23+
24+
/* 2) Compile for Java 1.8 or greater */
25+
compileOptions {
26+
sourceCompatibility JavaVersion.VERSION_1_8
27+
targetCompatibility JavaVersion.VERSION_1_8
28+
}
29+
30+
/* 3) Exclude duplicate licenses */
31+
packagingOptions {
32+
exclude 'META-INF/LICENSE.txt'
33+
exclude 'META-INF/LICENSE'
34+
exclude 'META-INF/NOTICE.txt'
35+
exclude 'META-INF/NOTICE'
36+
exclude 'META-INF/DEPENDENCIES'
37+
pickFirst 'AndroidManifest.xml'
38+
}
39+
2040
}
2141

2242
dependencies {
2343
compile fileTree(dir: 'libs', include: ['*.jar'])
2444
testCompile 'junit:junit:4.12'
2545
compile 'com.android.support:appcompat-v7:23.1.1'
2646
compile 'com.android.support:design:23.1.1'
47+
48+
/* 4) Add the CSDK framework dependencies (Make sure these version numbers are correct) */
49+
compile 'com.adobe.creativesdk.foundation:auth:0.9.7'
2750
}

getting-started/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
android:icon="@mipmap/ic_launcher"
88
android:label="@string/app_name"
99
android:supportsRtl="true"
10-
android:theme="@style/AppTheme">
10+
android:theme="@style/AppTheme"
11+
android:name=".MainApplication">
1112
<activity
1213
android:name=".MainActivity"
1314
android:label="@string/app_name"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.adobe.gettingstarted;
2+
3+
import android.app.Application;
4+
5+
import com.adobe.creativesdk.foundation.AdobeCSDKFoundation;
6+
import com.adobe.creativesdk.foundation.auth.IAdobeAuthClientCredentials;
7+
8+
/**
9+
* Created by ash on 3/10/16.
10+
*/
11+
public class MainApplication extends Application implements IAdobeAuthClientCredentials {
12+
13+
/* Be sure to fill in the two strings below. */
14+
private static final String CREATIVE_SDK_CLIENT_ID = Keys.CSDK_CLIENT_ID;
15+
private static final String CREATIVE_SDK_CLIENT_SECRET = Keys.CSDK_CLIENT_SECRET;
16+
17+
@Override
18+
public void onCreate() {
19+
super.onCreate();
20+
AdobeCSDKFoundation.initializeCSDKFoundation(getApplicationContext());
21+
}
22+
23+
@Override
24+
public String getClientID() {
25+
return CREATIVE_SDK_CLIENT_ID;
26+
}
27+
28+
@Override
29+
public String getClientSecret() {
30+
return CREATIVE_SDK_CLIENT_SECRET;
31+
}
32+
}

getting-started/build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,23 @@ buildscript {
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
12+
13+
/* 1) Add the Gradle Retrolambda Plugin */
14+
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta3'
1215
}
1316
}
1417

1518
allprojects {
1619
repositories {
1720
jcenter()
21+
22+
/* 2) Add mavenCentral */
23+
mavenCentral()
24+
25+
/* 3) Add the Creative SDK Maven repo URL */
26+
maven {
27+
url 'https://repo.adobe.com/nexus/content/repositories/releases/'
28+
}
1829
}
1930
}
2031

getting-started/readme.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Android: Getting Started
2+
3+
This repo accompanies [the Creative SDK Getting Started guide for Android](https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html).
4+
5+
6+
## How to use
7+
8+
Just follow the steps below.
9+
10+
### In your browser
11+
12+
1. [Register a new app for the Creative SDK](https://creativesdk.adobe.com/myapps.html)
13+
1. Note your Client ID and Secret. You will need them soon.
14+
15+
### In your local development environment
16+
17+
1. `git clone` the repo
18+
![](https://github.com/ashryanbeats/CSDKBase/blob/screenshots/screenshots/add-creativesdk-repo.png)
19+
20+
1. Add a new Java class called `Keys` with this code:
21+
22+
```
23+
public class Keys {
24+
25+
public static final String CSDK_CLIENT_ID = "<YOUR_ID_HERE>";
26+
public static final String CSDK_CLIENT_SECRET = "<YOU_SECRET_HERE>";
27+
28+
}
29+
```
30+
31+
1. Add your Client ID and Secret to the `Keys` class
32+
1. This class is gitignored so you can avoid exposing your keys in GitHub
33+
1. Sync your Gradle files and run the app

0 commit comments

Comments
 (0)