diff --git a/.travis.yml b/.travis.yml index 88afd13..d98c7d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ language: android jdk: oraclejdk8 +cache: false sudo: false env: global: - ANDROID_API_LEVEL=25 - - EMULATOR_API_LEVEL=21 + - EMULATOR_API_LEVEL=22 - ANDROID_BUILD_TOOLS_VERSION=25.0.2 - ANDROID_ABI=armeabi-v7a - - ADB_INSTALL_TIMEOUT=8 # minutes (2 minutes by default) - SDCARD_NAME=sdcard-${EMULATOR_API_LEVEL}.img android: components: @@ -38,15 +38,15 @@ before_script: # Create & wait for emulator - echo no | android create avd -f -n emulator-v${EMULATOR_API_LEVEL} -t android-${EMULATOR_API_LEVEL} --abi ${ANDROID_ABI} --sdcard ${SDCARD_NAME} - emulator -avd emulator-v${EMULATOR_API_LEVEL} -no-audio -no-window & - - android-wait-for-emulator - - android list target + - ./android-wait-for-emulator + - adb shell input keyevent 82 & # Install APKs needed for UI tests - adb install test-apks/AndroidPdfViewer_1_0_1.apk - adb install test-apks/FakeFacebook.apk - adb install test-apks/FakeGmail.apk script: - - ./gradlew jacocoTestReport --info -Pinstall_options=-r,-t -PTEST_COVERAGE_ENABLED=true + - ./gradlew jacocoTestReport --stacktrace -Pinstall_options=-r,-t -PTEST_COVERAGE_ENABLED=true after_success: - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/README.md b/README.md index 5028687..ccb2fd6 100644 --- a/README.md +++ b/README.md @@ -27,17 +27,23 @@ compile 'com.github.zawadz88:material-activity-chooser:0.2.1' - going to the chosen activity settings on long-click ## Screenshots - - Showcase
+ +### Showcase - - Sharing with MaterialActivityChooser
+ +### Sharing with MaterialActivityChooser - - Sharing with the system IntentChooser on Nougat for comparison
+ +### Sharing with the system IntentChooser on Nougat for comparison - - Sharing with MaterialActivityChooser with custom style
+ +### Sharing with MaterialActivityChooser with custom style - - Sharing with MaterialActivityChooser when no activities found
+ +### Sharing with MaterialActivityChooser when no activities found - - Sharing with MaterialActivityChooser when no activities found with a custom view
+ +### Sharing with MaterialActivityChooser when no activities found with a custom view ## Getting started diff --git a/android-wait-for-emulator b/android-wait-for-emulator new file mode 100755 index 0000000..7daf055 --- /dev/null +++ b/android-wait-for-emulator @@ -0,0 +1,25 @@ +#!/bin/bash + +# Originally written by Ralf Kistner , but placed in the public domain + +set +e + +bootanim="" +failcounter=0 +timeout_in_sec=600 + +until [[ "$bootanim" =~ "stopped" ]]; do + bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &` + if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline" + || "$bootanim" =~ "running" ]]; then + let "failcounter += 1" + echo "Waiting for emulator to start" + if [[ $failcounter -gt timeout_in_sec ]]; then + echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator" + exit 1 + fi + fi + sleep 1 +done + +echo "Emulator is ready" \ No newline at end of file diff --git a/build.gradle b/build.gradle index 4d8d363..2dc022c 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.3' + classpath 'com.android.tools.build:gradle:2.3.1' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' @@ -26,7 +26,7 @@ configure(allprojects) { androidTargetSdkVersion = 25 androidCompileSdkVersion = 25 androidBuildToolsVersion = "25.0.2" - androidSupportLibraryVersion = "25.1.0" + androidSupportLibraryVersion = "25.3.1" butterknifeVersion = "8.4.0" junitVersion = "4.12" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 04e285f..f00491a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Dec 28 10:00:20 PST 2015 +#Thu Mar 23 10:57:18 CET 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip