Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedol committed Jun 19, 2014
2 parents 35fc685 + e89a647 commit c511de5
Show file tree
Hide file tree
Showing 106 changed files with 1,572 additions and 807 deletions.
44 changes: 10 additions & 34 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,13 @@
language: java
jdk: oraclejdk7
env:
matrix:
- ANDROID_SDKS=android-17,sysimg-17 ANDROID_TARGET=android-17 ANDROID_ABI=armeabi-v7a
before_install:
# download the latest android sdk and unzip
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
- wget http://dl.google.com/android/android-sdk_r22-linux.tgz
- tar xzf android-sdk_r22-linux.tgz
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools

# install android build tools
- wget https://dl-ssl.google.com/android/repository/build-tools_r17-linux.zip
- unzip build-tools_r17-linux.zip -d $ANDROID_HOME
- mkdir -p $ANDROID_HOME/build-tools/
- mv $ANDROID_HOME/android-4.2.2 $ANDROID_HOME/build-tools/17.0.0
- echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null
- echo yes | android update sdk --filter android-16 --no-ui --force > /dev/null
- echo yes | android update sdk --filter android-17 --no-ui --force > /dev/null
- echo yes | android update sdk --filter sysimg-17 --no-ui --force > /dev/null
- echo yes | android update sdk --filter extra-android-support --no-ui --force > /dev/null
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null

# Create and start emulator
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &

before_script:
- chmod +x build.sh
- chmod +x ci/wait_for_emulator.sh
- ci/wait_for_emulator.sh
- adb shell input keyevent 82

script: ./build.sh
- export TERM=dumb
- sudo apt-get install -qq libstdc++6:i386 lib32z1
- export COMPONENTS=build-tools-19.1.0,android-19,extra-android-m2repository
- curl -L https://raw.github.com/embarkmobile/android-sdk-installer/version-1/android-sdk-installer | bash /dev/stdin --install=$COMPONENTS
- source ~/.android-sdk-installer/env

notifications:
hipchat:
rooms:
secure: Pz5CQX/NtKLkk8c6kjhxipMS6kdQTj5jaeN9LC2k1IzERsqCYnx/nD2EV0cG4YJO0W3sMK3vaVgL5lLE3xHpe7wsLB/LWmxLY8QV0NJaSGOqqXAC4S5Yo7MRFd2S5fPWN7MC05SPpqiDveEle1fK6Gz7oHXSZxAFMyYnLRcaX3M=
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Read about it at **[smssync.ushahidi.com](http://smssync.ushahidi.com/)**.

## Installation

Insallation and configuration details are [here][1].
Installation and configuration details are [here][1].

## Development

Expand All @@ -20,6 +20,6 @@ Post on our [forums][3]

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ushahidi/smssync/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

[1]: http://smssync.ushahidi.com/howto
[2]: http://smssync.ushahidi.com/doc
[1]: http://smssync.ushahidi.com/configure/
[2]: http://smssync.ushahidi.com/developers/
[3]: https://wiki.ushahidi.com/pages/viewpage.action?pageId=8357140
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.3'
classpath 'com.android.tools.build:gradle:0.10.4'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
}
}
}
50 changes: 33 additions & 17 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
[
{
"version": "v2.5.1",
"date": "November 14, 2013",
"version": "v2.6",
"date": "June 19, 2014",
"features": [
"Replaced Action Bar Sherlock library with ActionBarCompat support library.",
"Upgraded Google Analytics library to V3.",
"Replaced the dropdown widget which is used for setting the frequencies for the schedulers with a time picker widget. Now you can set any time for the schedulers and not restricted to the predefined ones.",
"Now Task messages appear in the pending tray before they are attempted to be sent as SMS. This makes it possible to automatically or manually processed them when they fail to be sent as SMS.",
"Action Bar Contextual Menu now has 'selected' appended to the selection count label. Makes reading the count more meaningful.",
"Added KitKat, Android 4.4.x support. Now you can set SMSSync as your default messaging app."
],
"bugs": [
"Fixed duplicate call to ‘readLogs @Produce’ function which causes the application to crash unexpectedly.",
"Fixed issues with configured secret key not able to match with the one set on the server when it has spaces.",
"Fixed issue with app crashing on some devices when checking for a connection before attempting a sync process after the device has finished booting."
]
},
{
"version": "v2.5.1",
"date": "November 14, 2013",
"features": [],
"bugs": [
"Fixed issue with app crashing when up attempts to read certain device's phone number",
"Fixed a wrong timestamp showing when a sync hasn't been run before"
]
},
{
"version": "v2.5",
"date": "November 14, 2013",
"features": [
"Added log viewer feature. This logs verbosely the activities that are happening when the app is running.",
"Added ability to configure different format for the sync scheme. Now JSON, XML and URLEncoded are supported.",
"Added Basic Auth to Sync URL. Now you can authenticate request from SMSSync",
"Updated Ukrainian strings. SMSSync is now fully translated into Ukrainian"
],
"bugs": [
"Refactored existing HTTP client code. Made it easier to read maintain",
"Fixed issue with task check not working when there is no secret key set.",
"Fixed a lot of internal bugs"
]
},
{
"version": "v2.5",
"date": "November 14, 2013",
"features": [
"Added log viewer feature. This logs verbosely the activities that are happening when the app is running.",
"Added ability to configure different format for the sync scheme. Now JSON, XML and URLEncoded are supported.",
"Added Basic Auth to Sync URL. Now you can authenticate request from SMSSync",
"Updated Ukrainian strings. SMSSync is now fully translated into Ukrainian"
],
"bugs": [
"Refactored existing HTTP client code. Made it easier to read maintain",
"Fixed issue with task check not working when there is no secret key set.",
"Fixed a lot of internal bugs"
]
},
{
"version": "v2.4",
Expand Down
24 changes: 23 additions & 1 deletion contributors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title" : "List of contributors to the SMSSync project",
"note" : "Sorted by last name",
"total" : 12,
"total" : 14,
"contributors" :
[
{
Expand Down Expand Up @@ -70,6 +70,17 @@
"longitude" : 12.56738
}
},
{
"name" : "Kamil Kalfas",
"email" : "kkalfas@soldevelo.com",
"website" : "http://www.soldevelo.com/",
"description" : "Added Message Results API, Bug fixes",
"country" : {
"name" : "Poland",
"latitude" : 54.362417,
"longitude" : 18.588555
}
},
{
"name" : "Ebony Mathis",
"email" : "mse.mathis@gmail.com",
Expand Down Expand Up @@ -135,6 +146,17 @@
"latitude" : 55.378051,
"longitude" : -3.435973
}
},
{
"name" : "Tomasz Stalka",
"email" : "tstalka@soldevelo.com",
"website" : "http://www.soldevelo.com/",
"description" : "Tasks for sending sms should appear in pending tray, before going to sent tray",
"country" : {
"name" : "Poland",
"latitude" : 54.362417,
"longitude" : 18.588555
}
}
]
}
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 @@
#Mon Oct 21 11:52:41 JST 2013
#Tue Apr 29 08:01:13 JST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
5 changes: 3 additions & 2 deletions libraries/pay-me/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apply plugin: 'android-sdk-manager'
apply plugin: 'android-library'

android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
compileSdkVersion 19
buildToolsVersion "19.1.0"

sourceSets {
main {
Expand Down
30 changes: 20 additions & 10 deletions smssync/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
apply plugin: 'android-sdk-manager'
apply plugin: 'android'

repositories {
Expand All @@ -7,14 +8,14 @@ repositories {
dependencies {
compile project(':libraries:pay-me')
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.android.support:support-v4:18.0.+'
compile 'com.android.support:support-v4:19.1.+'
compile 'com.android.support:appcompat-v7:19.0.+'
compile 'com.squareup:otto:1.3.4'
}

android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
compileSdkVersion 19
buildToolsVersion "19.1.0"

sourceSets {

Expand Down Expand Up @@ -70,10 +71,19 @@ android {
}

defaultConfig {
versionCode 20
versionName "2.5.1"
versionCode 21
versionName "2.6"
minSdkVersion 8
targetSdkVersion 18
targetSdkVersion 19
}

lintOptions {
abortOnError false
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

android.applicationVariants.all { variant ->
Expand Down Expand Up @@ -104,15 +114,15 @@ android {
}
}

flavorGroups "analytics"
flavorDimensions "analytics"
productFlavors {

withAnalytics {
flavorGroup "analytics"
flavorDimensions "analytics"
}

noAnalytics {
flavorGroup "analytics"
flavorDimensions "analytics"
}
}
}
Expand Down
Binary file added smssync/libs/libGoogleAnalyticsServices.jar
Binary file not shown.
Binary file removed smssync/libs/libGoogleAnalyticsV2.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,6 @@ public void setUp() throws Exception {
mProcessSms = new ProcessSms(getContext());
}

@SmallTest
public void testShouldFindMessageId() throws Exception {
final String body = "foo bar";
final String address = "1234";
ContentValues values = new ContentValues();
values.put("address", address);
values.put("body", body);
Uri uriSms = getContext().getContentResolver()
.insert(Uri.parse(ProcessSms.SMS_CONTENT_INBOX), values);

assertNotNull("Could not add sms to sms inbox",uriSms);

String[] projection = {
"_id", "address", "date", "body"
};

Cursor c = getContext().getContentResolver().query(uriSms, projection, null,
null, "date DESC");
assertNotNull(c);
c.moveToFirst();
long timeStamp = c.getLong(c.getColumnIndex("date"));
c.close();
long threadId = mProcessSms.getThreadId(body, address);
assertTrue("Could not find message ID ",mProcessSms.findMessageId(threadId,timeStamp) > 0);
assertTrue("Could not delete sms from inbox ", mProcessSms.delSmsFromInbox(body, address));
}

@SmallTest
public void testShouldFilterTextByKeyword() throws Exception {
final String keyword = "hello, accra, go, home , yes";
Expand Down Expand Up @@ -95,39 +68,11 @@ public void testShouldFilterTextNumbersAndUTF8Keywords() throws Exception {
assertTrue(filtered);
}

@SmallTest
public void testShouldGetMessageThreadId() throws Exception {
final String body = "foo bar";
final String address = "123456789";
ContentValues values = new ContentValues();
values.put("address", address);
values.put("body", body);
assertNotNull("Could not add sms to sms inbox", getContext().getContentResolver()
.insert(Uri.parse(ProcessSms.SMS_CONTENT_INBOX), values));

final long msgThreadId = mProcessSms.getThreadId(body, address);
assertTrue("Could not get sms thread Id", msgThreadId > 0);
assertTrue("Could not delete sms from inbox ", mProcessSms.delSmsFromInbox(body, address));

}

@SmallTest
public void testShouldGetUuid() throws Exception {
assertNotNullOrEmpty("Could not get UUID", mProcessSms.getUuid());
}

@SmallTest
public void testShouldDeleteSmsFromSmsInbox() throws Exception {
final String body = "foo bar";
final String address = "123443";
ContentValues values = new ContentValues();
values.put("address", address);
values.put("body", body);
assertNotNull("Could not add sms to sms inbox", getContext().getContentResolver()
.insert(Uri.parse(ProcessSms.SMS_CONTENT_INBOX), values));
final boolean rowDeleted = mProcessSms.delSmsFromInbox(body, address);
assertTrue("Could not delete sms from sms inbox", rowDeleted);
}

@SmallTest
public void testShouldPostPendingMessageToSentInbox() throws Exception {
Expand All @@ -154,30 +99,6 @@ public void testShouldPostTaskMessageToSentInbox() throws Exception {
assertTrue("Could not delete the message",message.deleteAllMessages());
}

@SmallTest
public void testShouldImportMessagesFromSmsInbox() throws Exception {
Message message = new Message();
// Remove any message in the message inbox
message.deleteAllMessages();

// initialize some content in the sms inbox
final String body = "foo bar";
final String address = "123443";
ContentValues values = new ContentValues();
values.put("address", address);
values.put("body", body);
assertNotNull("Could not add sms to sms inbox", getContext().getContentResolver()
.insert(Uri.parse(ProcessSms.SMS_CONTENT_INBOX), values));
assertNotNull("Could not add sms to sms inbox", getContext().getContentResolver()
.insert(Uri.parse(ProcessSms.SMS_CONTENT_INBOX), values));
assertNotNull("Could not add sms to sms inbox", getContext().getContentResolver()
.insert(Uri.parse(ProcessSms.SMS_CONTENT_INBOX), values));
// import messages
final int imported = mProcessSms.importMessages();
assertNotNullOrZero("Could not import messages", imported );

}

@Override
public void tearDown() throws Exception {
super.tearDown();
Expand Down
Loading

0 comments on commit c511de5

Please sign in to comment.