Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedol committed Nov 11, 2014
2 parents 02ddf0e + fa2d60a commit a4633a9
Show file tree
Hide file tree
Showing 18 changed files with 412 additions and 249 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ before_install:
install:
- TERM=dumb ./gradlew assemble

before_script:
- adb devices
- chmod +x ./wait_for_emulator
- ./wait_for_emulator
#before_script:
# - adb devices
# - chmod +x ./wait_for_emulator
# - ./wait_for_emulator

script:
- TERM=dumb ./gradlew connectedAndroidTest
- TERM=dumb ./gradlew build

notifications:
hipchat:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
classpath 'com.android.tools.build:gradle:0.14.1'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
}
}
14 changes: 14 additions & 0 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
[
{
"version": "v2.7.1",
"date": "November 11, 2014",
"features": [
"Updated website with demo code showing how to integrate the message result API",
"Updated failed notification icon."
],
"bugs": [
"Fixed a bug with message result API.",
"Fixed issue with feedback dialog not sending email addresses.",
"Updated website documentation to match required JSON structure.",
"Fixed feedback dialog so it only validate for the email address field when user hit the positive button."
]
},
{
"version": "v2.7",
"date": "October 27, 2014",
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Apr 29 08:01:13 JST 2014
#Thu Nov 06 18:50:38 JST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip
2 changes: 1 addition & 1 deletion libraries/pay-me/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'android-library'

android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
buildToolsVersion "21.0.2"

sourceSets {
main {
Expand Down
2 changes: 1 addition & 1 deletion libraries/survey-dialog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'android-library'

android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
buildToolsVersion "21.0.2"
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
Expand Down
5 changes: 2 additions & 3 deletions sms-portals/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'android'

android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
buildToolsVersion "21.0.2"

defaultConfig {
applicationId "com.smssync.portal.one"
Expand All @@ -16,8 +16,7 @@ android {

buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
minifyEnabled false
}
}

Expand Down
42 changes: 22 additions & 20 deletions smssync/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {

android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
buildToolsVersion "21.0.2"

sourceSets {

Expand Down Expand Up @@ -52,8 +52,8 @@ android {

proguard.initWith(buildTypes.debug)
proguard {
runProguard true
proguardFile 'proguard-android.txt'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}

release {
Expand All @@ -77,15 +77,15 @@ android {

proguard.initWith(buildTypes.release)
proguard {
runProguard true
proguardFile 'proguard-android.txt'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}

}

defaultConfig {
versionCode 23
versionName "2.7"
versionCode 24
versionName "2.7.1"
minSdkVersion 8
targetSdkVersion 19
}
Expand All @@ -100,29 +100,31 @@ android {
}

android.applicationVariants.all { variant ->

def apk = variant.outputFile;

def newName = apk.name.replace(".apk",
"-v" + defaultConfig.versionName + "-" + variant.buildType.name.toUpperCase() +
".apk");

variant.outputFile = file("$project.buildDir/apk/" + newName);
if (variant.zipAlign) {
variant.zipAlign.outputFile =
file("$project.buildDir/apk/" + newName.replace("-unaligned", ""));
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def newName = outputFile.name.replace(".apk",
"-v" + defaultConfig.versionName + "-" + variant.buildType.name.toUpperCase() +
".apk");

output.outputFile = file("$project.buildDir/apk/" + newName);
if (output.zipAlign) {
output.zipAlign.outputFile =
file("$project.buildDir/apk/" + newName.replace("-unaligned", ""));
}
}
}
}

flavorDimensions "analytics"
productFlavors {

withAnalytics {
flavorDimensions "analytics"
flavorDimension "analytics"
}

noAnalytics {
flavorDimensions "analytics"
flavorDimension "analytics"
}
}
}
Expand Down
57 changes: 0 additions & 57 deletions smssync/proguard-android.txt

This file was deleted.

17 changes: 17 additions & 0 deletions smssync/proguard-rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/menny/dev/sdk/tools/proguard/proguard-rules.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@

import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.util.Patterns;
Expand All @@ -55,8 +57,6 @@ public class MainActivity extends BaseActivity<MainView> implements OnClickButto

private AutoCompleteTextView mEmailAddress;

private static final String GOOGLE_FORM_URL = BuildConfig.GOOGLE_FORM_URL;

public MainActivity() {
super(MainView.class, R.layout.main_activity, R.menu.main_activity, R.id.drawer_layout,
R.id.left_drawer);
Expand Down Expand Up @@ -120,20 +120,27 @@ public boolean onOptionsItemSelected(MenuItem item) {

@Override
public void onClickButton(int which) {
Handler handler = new Handler();
handler.post(new Runnable() {
@Override
public void run() {
final String email = mEmailAddress.getText().toString();
if (Util.validateEmail(email)) {
final UrlHelper uriHelper = new UrlHelperImpl(GOOGLE_FORM_URL);
new GoogleDocsHttpClient(uriHelper.getUrl(), MainActivity.this)
.postToGoogleDocs(email);
} else {
toastLong(R.string.in_valid_email_address);
}
if (which == DialogInterface.BUTTON_POSITIVE) {
final String email = mEmailAddress.getText().toString();
if (Util.validateEmail(email)) {
PostToGoogleTask postToGoogleTask = new PostToGoogleTask();
postToGoogleTask.execute(email);
} else {
toastLong(R.string.in_valid_email_address);
}
});
}

}

public class PostToGoogleTask extends AsyncTask<String, Void, String> {

protected String doInBackground(String... emails) {
final UrlHelper uriHelper = new UrlHelperImpl(BuildConfig.GOOGLE_FORM_URL);
final GoogleDocsHttpClient client = new GoogleDocsHttpClient(uriHelper.getUrl(),
MainActivity.this);
client.postToGoogleDocs(emails[0]);
return null;
}

}

Expand Down
Loading

0 comments on commit a4633a9

Please sign in to comment.