Skip to content

Commit 58e9770

Browse files
author
anuj
committed
Google Cloud Translate API Example Android
1 parent 2dc977e commit 58e9770

File tree

33 files changed

+664
-0
lines changed

33 files changed

+664
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

GoogleCloudTranslateAPIExample/.idea/compiler.xml

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

GoogleCloudTranslateAPIExample/.idea/copyright/profiles_settings.xml

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

GoogleCloudTranslateAPIExample/.idea/gradle.xml

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

GoogleCloudTranslateAPIExample/.idea/misc.xml

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

GoogleCloudTranslateAPIExample/.idea/modules.xml

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

GoogleCloudTranslateAPIExample/.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# android-google-cloud-translate
2+
Example Android app using google-cloud-translate
3+
4+
**NOTES:**
5+
- Before testing the app, replace `MainActivity.API_KEY` with your actual Translate API Key.
6+
- This is by no means a real world application. I strongly discourage you from saving your API_KEY in plain sight.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 23
5+
buildToolsVersion '25.0.0'
6+
defaultConfig {
7+
applicationId "com.example.acadgild.translationdemo"
8+
minSdkVersion 15
9+
targetSdkVersion 23
10+
versionCode 1
11+
versionName "1.0"
12+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
multiDexEnabled true
14+
}
15+
configurations.all {
16+
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
17+
}
18+
buildTypes {
19+
release {
20+
minifyEnabled false
21+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22+
}
23+
}
24+
packagingOptions {
25+
exclude 'META-INF/LICENSE'
26+
exclude 'META-INF/io.netty.versions.properties'
27+
exclude 'META-INF/INDEX.LIST'
28+
}
29+
}
30+
31+
dependencies {
32+
compile fileTree(dir: 'libs', include: ['*.jar'])
33+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
34+
exclude group: 'com.android.support', module: 'support-annotations'
35+
})
36+
compile 'com.android.support:appcompat-v7:23.4.0'
37+
compile ('com.google.apis:google-api-services-translate:v2-rev47-1.22.0') {
38+
exclude group: 'com.google.guava'
39+
}
40+
compile ('com.google.cloud:google-cloud-translate:0.5.0') {
41+
exclude group: 'io.grpc', module: 'grpc-all'
42+
exclude group: 'com.google.protobuf', module: 'protobuf-java'
43+
exclude group: 'com.google.api-client', module: 'google-api-client-appengine'
44+
}
45+
testCompile 'junit:junit:4.12'
46+
}

0 commit comments

Comments
 (0)