diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e25e1be7a..0b737c568 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -19,7 +19,7 @@ jobs: java-version: '11' distribution: 'adopt' - name: Download WebRTC - run: mkdir libs && wget -O libs/libwebrtc-m92.aar https://gultsch.de/files/libwebrtc-m92.aar + run: mkdir libs && wget -O libs/libwebrtc-m99.aar https://gultsch.de/files/libwebrtc-m99.aar - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build Quicksy diff --git a/.tx/config b/.tx/config deleted file mode 100644 index 16a45f234..000000000 --- a/.tx/config +++ /dev/null @@ -1,21 +0,0 @@ -[main] -host = https://www.transifex.com -lang_map = af_ZA: af-rZA, am_ET: am-rET, ar_AE: ar-rAE, ar_BH: ar-rBH, ar_DZ: ar-rDZ, ar_EG: ar-rEG, ar_IQ: ar-rIQ, ar_JO: ar-rJO, ar_KW: ar-rKW, ar_LB: ar-rLB, ar_LY: ar-rLY, ar_MA: ar-rMA, ar_OM: ar-rOM, ar_QA: ar-rQA, ar_SA: ar-rSA, ar_SY: ar-rSY, ar_TN: ar-rTN, ar_YE: ar-rYE, arn_CL: arn-rCL, as_IN: as-rIN, az_AZ: az-rAZ, ba_RU: ba-rRU, be_BY: be-rBY, bg_BG: bg-rBG, bn_BD: bn-rBD, bn_IN: bn-rIN, bo_CN: bo-rCN, br_FR: br-rFR, bs_BA: bs-rBA, ca_ES: ca-rES, co_FR: co-rFR, cs_CZ: cs-rCZ, cy_GB: cy-rGB, da_DK: da-rDK, de_AT: de-rAT, de_CH: de-rCH, de_DE: de-rDE, de_LI: de-rLI, de_LU: de-rLU, dsb_DE: dsb-rDE, dv_MV: dv-rMV, el_GR: el-rGR, en_AU: en-rAU, en_BZ: en-rBZ, en_CA: en-rCA, en_GB: en-rGB, en_IE: en-rIE, en_IN: en-rIN, en_JM: en-rJM, en_MY: en-rMY, en_NZ: en-rNZ, en_PH: en-rPH, en_SG: en-rSG, en_TT: en-rTT, en_US: en-rUS, en_ZA: en-rZA, en_ZW: en-rZW, es_AR: es-rAR, es_BO: es-rBO, es_CL: es-rCL, es_CO: es-rCO, es_CR: es-rCR, es_DO: es-rDO, es_EC: es-rEC, es_ES: es-rES, es_GT: es-rGT, es_HN: es-rHN, es_MX: es-rMX, es_NI: es-rNI, es_PA: es-rPA, es_PE: es-rPE, es_PR: es-rPR, es_PY: es-rPY, es_SV: es-rSV, es_US: es-rUS, es_UY: es-rUY, es_VE: es-rVE, et_EE: et-rEE, eu_ES: eu-rES, fa_IR: fa-rIR, fi_FI: fi-rFI, fil_PH: fil-rPH, fo_FO: fo-rFO, fr_BE: fr-rBE, fr_CA: fr-rCA, fr_CH: fr-rCH, fr_FR: fr-rFR, fr_LU: fr-rLU, fr_MC: fr-rMC, fy_NL: fy-rNL, ga_IE: ga-rIE, gd_GB: gd-rGB, gl_ES: gl-rES, gsw_FR: gsw-rFR, gu_IN: gu-rIN, ha_NG: ha-rNG, hi_IN: hi-rIN, hr_BA: hr-rBA, hr_HR: hr-rHR, hsb_DE: hsb-rDE, hu_HU: hu-rHU, hy_AM: hy-rAM, id_ID: id-rID, ig_NG: ig-rNG, ii_CN: ii-rCN, is_IS: is-rIS, it_CH: it-rCH, it_IT: it-rIT, iu_CA: iu-rCA, ja_JP: ja-rJP, ka_GE: ka-rGE, kk_KZ: kk-rKZ, kl_GL: kl-rGL, km_KH: km-rKH, kn_IN: kn-rIN, ko_KR: ko-rKR, kok_IN: kok-rIN, ky_KG: ky-rKG, lb_LU: lb-rLU, lo_LA: lo-rLA, lt_LT: lt-rLT, lv_LV: lv-rLV, mi_NZ: mi-rNZ, mk_MK: mk-rMK, ml_IN: ml-rIN, mn_CN: mn-rCN, mn_MN: mn-rMN, moh_CA: moh-rCA, mr_IN: mr-rIN, ms_BN: ms-rBN, ms_MY: ms-rMY, mt_MT: mt-rMT, nb_NO: nb-rNO, ne_NP: ne-rNP, nl_BE: nl-rBE, nl_NL: nl-rNL, nn_NO: nn-rNO, nso_ZA: nso-rZA, oc_FR: oc-rFR, or_IN: or-rIN, pa_IN: pa-rIN, pl_PL: pl-rPL, prs_AF: prs-rAF, ps_AF: ps-rAF, pt_BR: pt-rBR, pt_PT: pt-rPT, qut_GT: qut-rGT, quz_BO: quz-rBO, quz_EC: quz-rEC, quz_PE: quz-rPE, rm_CH: rm-rCH, ro_RO: ro-rRO, ru_RU: ru-rRU, rw_RW: rw-rRW, sa_IN: sa-rIN, sah_RU: sah-rRU, se_FI: se-rFI, se_NO: se-rNO, se_SE: se-rSE, si_LK: si-rLK, sk_SK: sk-rSK, sl_SI: sl-rSI, sma_NO: sma-rNO, sma_SE: sma-rSE, smj_NO: smj-rNO, smj_SE: smj-rSE, smn_FI: smn-rFI, sms_FI: sms-rFI, sq_AL: sq-rAL, sr_BA: sr-rBA, sr_CS: sr-rCS, sr_ME: sr-rME, sr_RS: sr-rRS, sv_FI: sv-rFI, sv_SE: sv-rSE, sw_KE: sw-rKE, syr_SY: syr-rSY, ta_IN: ta-rIN, te_IN: te-rIN, tg_TJ: tg-rTJ, th_TH: th-rTH, tk_TM: tk-rTM, tn_ZA: tn-rZA, tr_TR: tr-rTR, tt_RU: tt-rRU, tzm_DZ: tzm-rDZ, ug_CN: ug-rCN, uk_UA: uk-rUA, ur_PK: ur-rPK, uz_UZ: uz-rUZ, vi_VN: vi-rVN, wo_SN: wo-rSN, xh_ZA: xh-rZA, yo_NG: yo-rNG, zh_CN: zh-rCN, zh_HK: zh-rHK, zh_MO: zh-rMO, zh_SG: zh-rSG, zh_TW: zh-rTW, zu_ZA: zu-rZA, no_NO: no-rNO, he_IL: iw-rIL, he: iw - -[conversations.main-strings] -file_filter = src/main/res/values-/strings.xml -source_file = src/main/res/values/strings.xml -source_lang = en - -[conversations.quicksy-strings] -file_filter = src/quicksy/res/values-/strings.xml -source_file = src/quicksy/res/values/strings.xml -source_lang = en -type = ANDROID - -[conversations.conversations-strings] -file_filter = src/conversations/res/values-/strings.xml -source_file = src/conversations/res/values/strings.xml -source_lang = en -type = ANDROID - diff --git a/CHANGELOG.md b/CHANGELOG.md index b7ef6c6fa..81c2d9e1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,20 @@ # Changelog +### Version 2.10.5 + +* Security: Stop downloading files that exceed advertised file size +* Security: Limit POSH files to 10K + +### Version 2.10.4 + +* Fix interaction with Google Maps Share Location Plugin +* Remove footnote with regards to server fee + ### Version 2.10.3 * Store files in location appropriate for Android 11 * Attempt to reconnect call after network switch +* Show caller JID and account JID in incoming call screen ### Version 2.10.2 diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..bc1d46abc --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "fastlane" +gem "screengrab" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..22cbee257 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,221 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.5) + rexml + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + artifactory (3.0.15) + atomos (0.1.3) + aws-eventstream (1.2.0) + aws-partitions (1.566.0) + aws-sdk-core (3.130.0) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.525.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.55.0) + aws-sdk-core (~> 3, >= 3.127.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.113.0) + aws-sdk-core (~> 3, >= 3.127.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.4) + aws-sigv4 (1.4.0) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + claide (1.1.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + declarative (0.0.20) + digest-crc (0.6.4) + rake (>= 12.0.0, < 14.0.0) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.7.6) + emoji_regex (3.2.3) + excon (0.91.0) + faraday (1.10.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.3) + multipart-post (>= 1.2, < 3) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.0) + faraday (~> 1.0) + fastimage (2.2.6) + fastlane (2.204.3) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored + commander (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (~> 2.0.0) + naturally (~> 2.2) + optparse (~> 0.1.1) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.3) + simctl (~> 1.6.3) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.16.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-core (0.4.2) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-iamcredentials_v1 (0.10.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-playcustomapp_v1 (0.7.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-storage_v1 (0.11.0) + google-apis-core (>= 0.4, < 2.a) + google-cloud-core (1.6.0) + google-cloud-env (~> 1.0) + google-cloud-errors (~> 1.0) + google-cloud-env (1.5.0) + faraday (>= 0.17.3, < 2.0) + google-cloud-errors (1.2.0) + google-cloud-storage (1.36.1) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.1) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.1.2) + faraday (>= 0.17.3, < 3.a) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.4) + domain_name (~> 0.5) + httpclient (2.8.3) + jmespath (1.6.1) + json (2.6.1) + jwt (2.3.0) + memoist (0.16.2) + mini_magick (4.11.0) + mini_mime (1.1.2) + multi_json (1.15.0) + multipart-post (2.0.0) + nanaimo (0.3.0) + naturally (2.2.1) + optparse (0.1.1) + os (1.1.4) + plist (3.6.0) + public_suffix (4.0.6) + rake (13.0.6) + representable (3.1.1) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.2.5) + rouge (2.0.7) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + screengrab (1.0.0) + fastlane (>= 2.0.0, < 3.0.0) + security (0.1.3) + signet (0.16.1) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.0) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.8) + CFPropertyList + naturally + terminal-notifier (2.0.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + trailblazer-option (0.1.2) + tty-cursor (0.7.1) + tty-screen (0.8.1) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8) + unicode-display_width (1.8.0) + webrick (1.7.0) + word_wrap (1.0.0) + xcodeproj (1.21.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + rexml (~> 3.2.4) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + fastlane + screengrab + +BUNDLED WITH + 2.2.5 diff --git a/README.md b/README.md index 4ea67449e..5a0d661aa 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,43 @@ # Cheogram Android This is a fork of [Conversations](https://conversations.im) to implement features of use to the [Sopranica](https://soprani.ca) project. + +The Cheogram Android app allows you to join a worldwide communication network. It especially focuses on features useful to users who want to contact those on other networks as well, such as SMS-enabled phone numbers. + +Based on the app Conversations, but with unique features: + +* Messages with both media and text, including animated media +* Unobtrusive display of subject lines, where present +* Links to known contacts are shown with their name +* Integrates with gateways' add contact flows +* When using a gateway to the phone network, integrate with the native Android Phone app +* Address book integration + +Where to get service: + +Cheogram Android requires you have an account with a Jabber service. You can run your own service, or use one provided by someone else, for example: https://snikket.org/hosting/ + +Art in screenshots is from https://www.peppercarrot.com by David Revoy, CC-BY. Artwork has been modified to crop out sections for avatars and photos, and in some cases add transparency. Use of this artwork does not imply endorsement of this project by the artist. + +## Getting Help + +If you have any questions about this app, or wish to report a bug, please come by the chatroom at xmpp:discuss@conference.soprani.ca?join or [on the web](https://anonymous.cheogram.com/discuss@conference.soprani.ca). + +## Contributing + +If you have code or patches you wish to contribute, the maintainer's preferred mechanism is a git pull request. Push your changes to a git repository somewhere, for example: + + git remote rename origin upstream + git remote add origin git@git.sr.ht:~yourname/cheogram-android + git push -u origin master + +Then generate the pull request: + + git fetch upstream master + git request-pull -p upstream/master origin + +And copy-paste the result into a plain-text email to: dev@singpolyma.net + +You may alternately use a patch-based approach as described on https://git-send-email.io + +Contributions follow an inbound=outbound model -- you (or your employer) keep all copyright on your patches, but agree to license them according to this project's COPYING file. diff --git a/art/ic_launcher.svg b/art/ic_launcher.svg index 96b17d2b4..68c403ecb 100644 --- a/art/ic_launcher.svg +++ b/art/ic_launcher.svg @@ -1,427 +1,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/art/message_bubble_received_obsidian.svg b/art/message_bubble_received_obsidian.svg new file mode 100644 index 000000000..a1e743733 --- /dev/null +++ b/art/message_bubble_received_obsidian.svg @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/build.gradle b/build.gradle index caf02dcda..52b2a476b 100644 --- a/build.gradle +++ b/build.gradle @@ -40,7 +40,7 @@ configurations { playstoreImplementation freeImplementation conversationsFreeImplementation - conversationsPlaystorImplementation + cheogramPlaystoreImplementation conversationsPlaystoreImplementation quicksyPlaystoreImplementation quicksyPlaystoreImplementation @@ -49,13 +49,21 @@ configurations { } dependencies { + androidTestImplementation 'tools.fastlane:screengrab:2.1.1' + androidTestImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test:runner:1.3.0' + androidTestImplementation 'androidx.test:rules:1.3.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.viewpager:viewpager:1.0.0' - playstoreImplementation('com.google.firebase:firebase-messaging:23.0.0') { + playstoreImplementation('com.google.firebase:firebase-messaging:23.0.2') { exclude group: 'com.google.firebase', module: 'firebase-core' exclude group: 'com.google.firebase', module: 'firebase-analytics' exclude group: 'com.google.firebase', module: 'firebase-measurement-connector' } + cheogramPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2") conversationsPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2") quicksyPlaystoreImplementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1' implementation 'org.sufficientlysecure:openpgp-api:10.0' @@ -66,8 +74,8 @@ dependencies { implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.google.android.material:material:1.4.0' - implementation "androidx.emoji2:emoji2:1.1.0-rc01" - freeImplementation "androidx.emoji2:emoji2-bundled:1.1.0-rc01" + implementation "androidx.emoji2:emoji2:1.1.0" + freeImplementation "androidx.emoji2:emoji2-bundled:1.1.0" implementation 'org.bouncycastle:bcmail-jdk15on:1.64' //zxing stopped supporting Java 7 so we have to stick with 3.3.3 @@ -80,8 +88,8 @@ dependencies { implementation "com.wefika:flowlayout:0.4.1" implementation 'com.otaliastudios:transcoder:0.10.4' - implementation 'org.jxmpp:jxmpp-jid:1.0.2' - implementation 'org.osmdroid:osmdroid-android:6.1.10' + implementation 'org.jxmpp:jxmpp-jid:1.0.3' + implementation 'org.osmdroid:osmdroid-android:6.1.11' implementation 'org.hsluv:hsluv:0.2' implementation 'org.conscrypt:conscrypt-android:2.5.2' implementation 'me.drakeet.support:toastcompat:1.1.0' @@ -109,16 +117,16 @@ android { compileSdkVersion 31 defaultConfig { - minSdkVersion 24 - targetSdkVersion 29 - versionCode 42024 + grgit.tag.list().size() - versionName grgit.describe(tags: true, always: true) - archivesBaseName += "-$versionName" + minSdkVersion 21 + targetSdkVersion 30 + versionCode 42024 + grgit.tag.list().findAll { it.dateTime != null }.size() + versionName grgit.describe(always: true) applicationId "eu.siacs.conversations" resValue "string", "applicationId", applicationId def appName = "Conversations" resValue "string", "app_name", appName buildConfigField "String", "APP_NAME", "\"$appName\""; + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/cheogram.doap b/cheogram.doap new file mode 100644 index 000000000..3db88c914 --- /dev/null +++ b/cheogram.doap @@ -0,0 +1,459 @@ + + + + + Cheogram Android + + 2021-06-12 + + Android Jabber Client + + Cheogram is a freedomware client for the Jabber network (using the XMPP protocol) with a focus on features for gateway users. + + + + + + + + + + + en + + + + + + + + Java + + Android + + + + + + + + + Soprani.ca + + + + + + + + + + + + + + + + + + + + complete + 1.4 + + + + + + complete + 2.5rc3 + + + + + + complete + 1.32.0 + + + + + + complete + 1.1 + + + + + + complete + 1.1 + + + + + + complete + 1.2 + + + + + + partial + 1.2 + Avatars only + + + + + + complete + 1.1.3 + + + + + + complete + 2.1 + + + + + + complete + 1.1 + + + + + + complete + 1.5.1 + + + + + + partial + 1.1 + Read only. Publication via XEP-0398 + + + + + + complete + 1.2.1 + Avatar, Nick, OMEMO + + + + + + complete + 1.1.2 + File transfer + A/V calls + + + + + + complete + 1.2.1 + + + + + + complete + 1.1 + read only + + + + + + complete + 1.1 + + + + + + complete + 1.4.0 + + + + + + complete + 1.3 + + + + + + complete + 1.6 + + + + + + complete + 2.0.1 + + + + + + complete + 2.0.1 + + + + + + complete + 0.7 + + + + + + complete + 1.1 + + + + + + complete + 0.19.1 + + + + + + complete + 1.3 + + + + + + complete + 1.0 + + + + + + complete + 1.2 + + + + + + complete + 1.0.3 + + + + + + complete + 1.0 + + + + + + complete + 0.13.1 + + + + + + complete + 1.0.1 + + + + + + complete + 1.0 + + + + + + complete + 1.2.0 + + + + + + complete + 0.6.3 + + + + + + complete + 1.0.2 + opt-in + + + + + + complete + 1.0.0 + + + + + + complete + 0.3 + + + + + + complete + 1.0.0 + + + + + + complete + 1.0.0 + + + + + + complete + 0.3.0 + + + + + + complete + 0.3.0 + + + + + + complete + 0.4.0 + Only available in the version distributed over Google Play + + + + + + complete + 1.0.0 + + + + + + complete + 1.1.0 + + + + + + complete + 0.2 + + + + + + complete + 0.3.0 + + + + + + complete + 0.1.2 + 2.5.8 + + + + + + complete + 0.6.0 + 2.3.1 + + + + + + complete + 0.1.4 + 1.22.0 + + + + + + complete + 0.1 + 2.5.8 + + + + + + complete + 0.2.1 + + + + + + complete + 1.0.1 + 2.5.4 + + + + + + complete + 0.2.0 + + + + + + complete + 0.1.0 + + + + diff --git a/conversations.doap b/conversations.doap deleted file mode 100644 index 93a7df126..000000000 --- a/conversations.doap +++ /dev/null @@ -1,472 +0,0 @@ - - - - - Conversations - - 2014-01-14 - - Android XMPP Client - - Conversations is an open source XMPP/Jabber client for the Android platform - - - - - - - - - - - - en - - - - - - - - - - - - - Java - - Android - - - - - - - - Daniel Gultsch - - - - - - - - - - - - - - - - - - - - complete - 1.4 - - - - - - complete - 2.5rc3 - - - - - - complete - 1.32.0 - - - - - - complete - 1.1 - - - - - - complete - 1.1 - - - - - - complete - 1.2 - - - - - - partial - 1.2 - Avatars only - - - - - - complete - 1.1.3 - - - - - - complete - 2.1 - - - - - - complete - 1.1 - - - - - - complete - 1.5.1 - - - - - - partial - 1.1 - Read only. Publication via XEP-0398 - - - - - - complete - 1.2.1 - Avatar, Nick, OMEMO - - - - - - complete - 1.1.2 - File transfer + A/V calls - - - - - - complete - 1.2.1 - - - - - - complete - 1.1 - read only - - - - - - complete - 1.1 - - - - - - complete - 1.4.0 - - - - - - complete - 1.3 - - - - - - complete - 1.6 - - - - - - complete - 2.0.1 - - - - - - complete - 2.0.1 - - - - - - complete - 0.7 - - - - - - complete - 1.1 - - - - - - complete - 0.19.1 - - - - - - complete - 1.3 - - - - - - complete - 1.0 - - - - - - complete - 1.2 - - - - - - complete - 1.0.3 - - - - - - complete - 1.0 - - - - - - complete - 0.13.1 - - - - - - complete - 1.0.1 - - - - - - complete - 1.0 - - - - - - complete - 1.2.0 - - - - - - complete - 0.6.3 - - - - - - complete - 1.0.2 - opt-in - - - - - - complete - 1.0.0 - - - - - - complete - 0.3 - - - - - - complete - 1.0.0 - - - - - - complete - 1.0.0 - - - - - - complete - 0.3.0 - - - - - - complete - 0.3.0 - - - - - - complete - 0.4.0 - Only available in the version distributed over Google Play - - - - - - complete - 1.0.0 - - - - - - complete - 1.1.0 - - - - - - complete - 0.2 - - - - - - complete - 0.3.0 - - - - - - complete - 0.1.2 - 2.5.8 - - - - - - complete - 0.6.0 - 2.3.1 - - - - - - complete - 0.1.4 - 1.22.0 - - - - - - complete - 0.1 - 2.5.8 - - - - - - complete - 0.2.1 - - - - - - complete - 1.0.1 - 2.5.4 - - - - - - complete - 0.2.0 - - - - - - complete - 0.1.0 - - - - - - 2.9.13 - 2021-05-03 - - - - - diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 000000000..03f2a0370 --- /dev/null +++ b/fastlane/Appfile @@ -0,0 +1,2 @@ +json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one +package_name("com.cheogram.android") # e.g. com.krausefx.app diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 000000000..ec1fe5a71 --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,38 @@ +# This file contains the fastlane.tools configuration +# You can find the documentation at https://docs.fastlane.tools +# +# For a list of all available actions, check out +# +# https://docs.fastlane.tools/actions +# +# For a list of all available plugins, check out +# +# https://docs.fastlane.tools/plugins/available-plugins +# + +# Uncomment the line if you want fastlane to automatically update itself +# update_fastlane + +default_platform(:android) + +platform :android do + desc "Build debug and test APK for screenshots" + lane :build_for_screengrab do + build_android_app( + task: 'assemble', + flavor: 'CheogramFree', + build_type: 'Debug' + ) + build_android_app( + task: 'assemble', + flavor: 'CheogramFree', + build_type: 'DebugAndroidTest' + ) + end + + desc "Build and take screenshots" + lane :build_and_screengrab do + build_for_screengrab + capture_android_screenshots + end +end diff --git a/fastlane/Screengrabfile b/fastlane/Screengrabfile new file mode 100644 index 000000000..1459e884a --- /dev/null +++ b/fastlane/Screengrabfile @@ -0,0 +1,5 @@ +locales ['en-US'] +clear_previous_screenshots true +tests_apk_path 'build/outputs/apk/androidTest/cheogramFree/debug/Conversations-cheogram-free-debug-androidTest.apk' +app_apk_path 'build/outputs/apk/cheogramFree/debug/Conversations-cheogram-free-debug.apk' +test_instrumentation_runner 'androidx.test.runner.AndroidJUnitRunner' \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/349.txt b/fastlane/metadata/android/en-US/changelogs/349.txt deleted file mode 100644 index b8f22adef..000000000 --- a/fastlane/metadata/android/en-US/changelogs/349.txt +++ /dev/null @@ -1,4 +0,0 @@ -* Introduce expert setting to perform channel discovery on local server instead of search.jabber.network -* Enable delivery check marks by default and remove setting -* Enable ‘Send button indicates status’ by default and remove setting -* Move Backup and Foreground Service settings to main screen diff --git a/fastlane/metadata/android/en-US/changelogs/351.txt b/fastlane/metadata/android/en-US/changelogs/351.txt deleted file mode 100644 index 8fabff2f1..000000000 --- a/fastlane/metadata/android/en-US/changelogs/351.txt +++ /dev/null @@ -1,3 +0,0 @@ -* fixes for Jingle IBB file transfer -* fixes for repeated corrections filling up the database -* switched to Last Message Correction v1.1 diff --git a/fastlane/metadata/android/en-US/changelogs/353.txt b/fastlane/metadata/android/en-US/changelogs/353.txt deleted file mode 100644 index 63b829a80..000000000 --- a/fastlane/metadata/android/en-US/changelogs/353.txt +++ /dev/null @@ -1,4 +0,0 @@ -* let users set their own nick name -* resume download of OMEMO encrypted files -* Channels now use '#' as symbol in avatar -* Quicksy uses 'always' as OMEMO encryption default (hides lock icon) diff --git a/fastlane/metadata/android/en-US/changelogs/360.txt b/fastlane/metadata/android/en-US/changelogs/360.txt deleted file mode 100644 index 87b92f033..000000000 --- a/fastlane/metadata/android/en-US/changelogs/360.txt +++ /dev/null @@ -1 +0,0 @@ -* Support for ?register and ?register;preauth XMPP uri parameters diff --git a/fastlane/metadata/android/en-US/changelogs/362.txt b/fastlane/metadata/android/en-US/changelogs/362.txt deleted file mode 100644 index f4bbc2ab1..000000000 --- a/fastlane/metadata/android/en-US/changelogs/362.txt +++ /dev/null @@ -1 +0,0 @@ -* Support automatic theme switching on Android 10 diff --git a/fastlane/metadata/android/en-US/changelogs/364.txt b/fastlane/metadata/android/en-US/changelogs/364.txt deleted file mode 100644 index ed2c80678..000000000 --- a/fastlane/metadata/android/en-US/changelogs/364.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Provide PDF preview on Android 5+ -* Use 12 byte IVs for OMEMO diff --git a/fastlane/metadata/android/en-US/changelogs/367.txt b/fastlane/metadata/android/en-US/changelogs/367.txt deleted file mode 100644 index 2f42bd95f..000000000 --- a/fastlane/metadata/android/en-US/changelogs/367.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Fix avatar selection on some Android 10 devices -* Fix file transfer for larger files diff --git a/fastlane/metadata/android/en-US/changelogs/379.txt b/fastlane/metadata/android/en-US/changelogs/379.txt deleted file mode 100644 index a99adee16..000000000 --- a/fastlane/metadata/android/en-US/changelogs/379.txt +++ /dev/null @@ -1 +0,0 @@ -* Audio/Video calls (Requires server support in form of STUN and TURN servers discoverable via XEP-0215) diff --git a/fastlane/metadata/android/en-US/changelogs/381.txt b/fastlane/metadata/android/en-US/changelogs/381.txt deleted file mode 100644 index a2df5e828..000000000 --- a/fastlane/metadata/android/en-US/changelogs/381.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Audible feedback (dialing, call started, call ended) for voice calls. -* Fixed issue with retrying failed video call diff --git a/fastlane/metadata/android/en-US/changelogs/382.txt b/fastlane/metadata/android/en-US/changelogs/382.txt deleted file mode 100644 index 89fc89b78..000000000 --- a/fastlane/metadata/android/en-US/changelogs/382.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Add button to switch camea during video call -* Fixed voice calls on tablets diff --git a/fastlane/metadata/android/en-US/changelogs/383.txt b/fastlane/metadata/android/en-US/changelogs/383.txt deleted file mode 100644 index 19c9a0116..000000000 --- a/fastlane/metadata/android/en-US/changelogs/383.txt +++ /dev/null @@ -1,3 +0,0 @@ -* Move call icon to the left in order to keep other toolbar icons in a consistent place -* Show call duration during audio calls -* Tie breaking for A/V calls (the same two people calling each other at the same time) diff --git a/fastlane/metadata/android/en-US/changelogs/387.txt b/fastlane/metadata/android/en-US/changelogs/387.txt deleted file mode 100644 index 2710be0a5..000000000 --- a/fastlane/metadata/android/en-US/changelogs/387.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Rework Login with certificate UI -* Add ability to pin chats on top (add to favorites) diff --git a/fastlane/metadata/android/en-US/changelogs/388.txt b/fastlane/metadata/android/en-US/changelogs/388.txt deleted file mode 100644 index 6a4909652..000000000 --- a/fastlane/metadata/android/en-US/changelogs/388.txt +++ /dev/null @@ -1,3 +0,0 @@ -* Reduce echo during calls on some devices -* Fix login when passwords contains special characters -* Play dial and busy tones on speaker during video calls diff --git a/fastlane/metadata/android/en-US/changelogs/390.txt b/fastlane/metadata/android/en-US/changelogs/390.txt deleted file mode 100644 index 56ed78885..000000000 --- a/fastlane/metadata/android/en-US/changelogs/390.txt +++ /dev/null @@ -1 +0,0 @@ -* Offer to record voice message when callee is busy diff --git a/fastlane/metadata/android/en-US/changelogs/393.txt b/fastlane/metadata/android/en-US/changelogs/393.txt deleted file mode 100644 index 82250ee87..000000000 --- a/fastlane/metadata/android/en-US/changelogs/393.txt +++ /dev/null @@ -1,3 +0,0 @@ -* Show help button if A/V call fails -* Fixed some annoying crashes -* Fixed Jingle connections (file transfer + calls) with bare JIDs diff --git a/fastlane/metadata/android/en-US/changelogs/394.txt b/fastlane/metadata/android/en-US/changelogs/394.txt deleted file mode 100644 index b04adbd56..000000000 --- a/fastlane/metadata/android/en-US/changelogs/394.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Fixed notifications not showing up under certain conditions -* Fixed compatibility issues and crashes related to A/V calls diff --git a/fastlane/metadata/android/en-US/changelogs/395.txt b/fastlane/metadata/android/en-US/changelogs/395.txt deleted file mode 100644 index 76a654338..000000000 --- a/fastlane/metadata/android/en-US/changelogs/395.txt +++ /dev/null @@ -1,3 +0,0 @@ -* add 'Return to chat' to audio call screen -* Improve keyboard shortcuts -* bug fixes diff --git a/fastlane/metadata/android/en-US/changelogs/397.txt b/fastlane/metadata/android/en-US/changelogs/397.txt deleted file mode 100644 index 207b36708..000000000 --- a/fastlane/metadata/android/en-US/changelogs/397.txt +++ /dev/null @@ -1,3 +0,0 @@ -* Handle GPX files -* Improve performance for backup restore -* bug fixes diff --git a/fastlane/metadata/android/en-US/changelogs/398.txt b/fastlane/metadata/android/en-US/changelogs/398.txt deleted file mode 100644 index 95280ea88..000000000 --- a/fastlane/metadata/android/en-US/changelogs/398.txt +++ /dev/null @@ -1,4 +0,0 @@ -* Search individual conversations -* Notify user if message delivery fails -* Remember display names (nicks) from Quicksy users across restarts -* Add button to start Orbot (Tor) from notification if necessary diff --git a/fastlane/metadata/android/en-US/changelogs/401.txt b/fastlane/metadata/android/en-US/changelogs/401.txt deleted file mode 100644 index 0fba861d3..000000000 --- a/fastlane/metadata/android/en-US/changelogs/401.txt +++ /dev/null @@ -1,3 +0,0 @@ -* fixed search on Android <= 5 -* optimize memory consumption - diff --git a/fastlane/metadata/android/en-US/changelogs/402.txt b/fastlane/metadata/android/en-US/changelogs/402.txt deleted file mode 100644 index 53f461756..000000000 --- a/fastlane/metadata/android/en-US/changelogs/402.txt +++ /dev/null @@ -1,3 +0,0 @@ -* Offer Easy Invite generation on supporting servers -* Display GIFs send from Movim -* store avatars in cache diff --git a/fastlane/metadata/android/en-US/changelogs/403.txt b/fastlane/metadata/android/en-US/changelogs/403.txt deleted file mode 100644 index 99d62ca48..000000000 --- a/fastlane/metadata/android/en-US/changelogs/403.txt +++ /dev/null @@ -1,3 +0,0 @@ -* Fixed connectivity issues when different accounts used different SCRAM mechanisms -* Add support for SCRAM-SHA-512 -* Allow P2P (Jingle) file transfer with self contact diff --git a/fastlane/metadata/android/en-US/changelogs/404.txt b/fastlane/metadata/android/en-US/changelogs/404.txt deleted file mode 100644 index d4f2e7b6d..000000000 --- a/fastlane/metadata/android/en-US/changelogs/404.txt +++ /dev/null @@ -1 +0,0 @@ -* minor stability improvements for A/V calls diff --git a/fastlane/metadata/android/en-US/changelogs/405.txt b/fastlane/metadata/android/en-US/changelogs/405.txt deleted file mode 100644 index e858b6cd1..000000000 --- a/fastlane/metadata/android/en-US/changelogs/405.txt +++ /dev/null @@ -1 +0,0 @@ -* Quicksy: Automatically receive verification SMS diff --git a/fastlane/metadata/android/en-US/changelogs/407.txt b/fastlane/metadata/android/en-US/changelogs/407.txt deleted file mode 100644 index e746bc7d7..000000000 --- a/fastlane/metadata/android/en-US/changelogs/407.txt +++ /dev/null @@ -1,3 +0,0 @@ -* Show call button for offline contacts if they previously announced support -* Back button no longer ends call when call is connected -* bug fixes diff --git a/fastlane/metadata/android/en-US/changelogs/42000.txt b/fastlane/metadata/android/en-US/changelogs/42000.txt deleted file mode 100644 index 1ecfe204d..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42000.txt +++ /dev/null @@ -1,4 +0,0 @@ -* Ability to select incoming call ringtone -* Fix OpenPGP key id discovery for OpenKeychain 5.6+ -* Properly verify punycode TLS certificates -* Improve stability of RTP session establishment (calling) diff --git a/fastlane/metadata/android/en-US/changelogs/42006.txt b/fastlane/metadata/android/en-US/changelogs/42006.txt deleted file mode 100644 index 91e2b904f..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42006.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Verify A/V calls with preexisting OMEMO sessions -* Improve compatibility with non libwebrtc WebRTC implementations diff --git a/fastlane/metadata/android/en-US/changelogs/42010.txt b/fastlane/metadata/android/en-US/changelogs/42010.txt deleted file mode 100644 index 3a1c234c1..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42010.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Various bug fixes around Tor support -* Improve call compatibility with Dino diff --git a/fastlane/metadata/android/en-US/changelogs/42012.txt b/fastlane/metadata/android/en-US/changelogs/42012.txt deleted file mode 100644 index 967fae964..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42012.txt +++ /dev/null @@ -1 +0,0 @@ -* fix HTTP up/download for users that don’t trust system CAs diff --git a/fastlane/metadata/android/en-US/changelogs/42013.txt b/fastlane/metadata/android/en-US/changelogs/42013.txt deleted file mode 100644 index 8749f0a0f..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42013.txt +++ /dev/null @@ -1 +0,0 @@ -* Fixed 'No Connectivity' issues on Android 7.1 diff --git a/fastlane/metadata/android/en-US/changelogs/42014.txt b/fastlane/metadata/android/en-US/changelogs/42014.txt deleted file mode 100644 index 8ae96511e..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42014.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Always verify domain name. No user overwrite -* Support roster pre authentication diff --git a/fastlane/metadata/android/en-US/changelogs/42015.txt b/fastlane/metadata/android/en-US/changelogs/42015.txt deleted file mode 100644 index 1d478b5a0..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42015.txt +++ /dev/null @@ -1 +0,0 @@ -* minor A/V improvements diff --git a/fastlane/metadata/android/en-US/changelogs/42018.txt b/fastlane/metadata/android/en-US/changelogs/42018.txt deleted file mode 100644 index 8f4d66caa..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42018.txt +++ /dev/null @@ -1,3 +0,0 @@ -* Show black bars when remote video does not match aspect ratio of screen -* Improve search performance -* Add setting to prevent screenshots diff --git a/fastlane/metadata/android/en-US/changelogs/42022.txt b/fastlane/metadata/android/en-US/changelogs/42022.txt deleted file mode 100644 index eaaa190fa..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42022.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Fix issue with some videos not being compressed -* Fix rare crash when opening notification diff --git a/fastlane/metadata/android/en-US/changelogs/42023.txt b/fastlane/metadata/android/en-US/changelogs/42023.txt deleted file mode 100644 index ed3c25380..000000000 --- a/fastlane/metadata/android/en-US/changelogs/42023.txt +++ /dev/null @@ -1,2 +0,0 @@ -* Fix crash when rendering some quotes -* Fix crash in welcome screen diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index e3b806b02..475532ab8 100644 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -1,39 +1,18 @@ -Easy to use, reliable, battery friendly. With built-in support for images, group chats and e2e encryption. +The Cheogram Android app allows you to join a worldwide communication network. It especially focuses on features useful to users who want to contact those on other networks as well, such as SMS-enabled phone numbers. -Design principles: +Based on the app Conversations, but with unique features: -* Be as beautiful and easy to use as possible without sacrificing security or privacy -* Rely on existing, well established protocols -* Do not require a Google Account or specifically Google Cloud Messaging (GCM) -* Require as few permissions as possible - -Features: - -* End-to-end encryption with either OMEMO or OpenPGP -* Sending and receiving images -* Encrypted audio and video calls (DTLS-SRTP) -* Intuitive UI that follows Android Design guidelines -* Pictures / Avatars for your Contacts -* Syncs with desktop client -* Conferences (with support for bookmarks) +* Messages with both media and text, including animated media +* Unobtrusive display of subject lines, where present +* Links to known contacts are shown with their name +* Show timestamps for calls +* Missed call notifications +* Integrates with gateways' add contact flows +* When using a gateway to the phone network, integrate with the native Android Phone app * Address book integration -* Multiple accounts / unified inbox -* Very low impact on battery life -Conversations makes it very easy to create an account on the conversations.im server. Using that server comes with an annual fee of 8 Euro after a 6 month trial period. However Conversations will work with any other XMPP server as well. A lot of XMPP servers are run by volunteers and are free of charge. +Where to get service: -XMPP Features: +Cheogram Android requires you have an account with a Jabber service. You can run your own service, or use one provided by someone else, for example: https://snikket.org/hosting/ -Conversations works with every XMPP server out there. However XMPP is an extensible protocol. These extensions are standardized as well in so called XEP’s. Conversations supports a couple of those to make the overall user experience better. There is a chance that your current XMPP server does not support these extensions. Therefore to get the most out of Conversations you should consider either switching to an XMPP server that does or - even better - run your own XMPP server for you and your friends. - -These XEPs are - as of now: - -* XEP-0065: SOCKS5 Bytestreams (or mod_proxy65). Will be used to transfer files if both parties are behind a firewall (NAT). -* XEP-0163: Personal Eventing Protocol for avatars -* XEP-0191: Blocking command lets you blacklist spammers or block contacts without removing them from your roster. -* XEP-0198: Stream Management allows XMPP to survive small network outages and changes of the underlying TCP connection. -* XEP-0280: Message Carbons which automatically syncs the messages you send to your desktop client and thus allows you to switch seamlessly from your mobile client to your desktop client and back within one conversation. -* XEP-0237: Roster Versioning mainly to save bandwidth on poor mobile connections -* XEP-0313: Message Archive Management synchronize message history with the server. Catch up with messages that were sent while Conversations was offline. -* XEP-0352: Client State Indication lets the server know whether or not Conversations is in the background. Allows the server to save bandwidth by withholding unimportant packages. -* XEP-0363: HTTP File Upload allows you to share files in conferences and with offline contacts. Requires an additional component on your server. +Art in screenshots is from https://www.peppercarrot.com by David Revoy, CC-BY. Artwork has been modified to crop out sections for avatars and photos, and in some cases add transparency. Use of this artwork does not imply endorsement of this project by the artist. diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png new file mode 100644 index 000000000..b35467abe Binary files /dev/null and b/fastlane/metadata/android/en-US/images/icon.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/01.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/01.png deleted file mode 100644 index edf446926..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/01.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/02.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/02.png deleted file mode 100644 index a3ea7d690..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/02.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/03.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/03.png deleted file mode 100644 index b1847dae1..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/03.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/04.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/04.png deleted file mode 100644 index 76d112650..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/04.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/05.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/05.png deleted file mode 100644 index bf13cd25d..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/05.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/06.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/06.png deleted file mode 100644 index fc57ca922..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/06.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/07.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/07.png deleted file mode 100644 index 44ce5f93b..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/07.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/08.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/08.png deleted file mode 100644 index 94840e6c6..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/08.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/09.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/09.png deleted file mode 100644 index 0d18d8ce6..000000000 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/09.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/conversation.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/conversation.png new file mode 100644 index 000000000..860a7c132 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/conversation.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/dialler.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/dialler.png new file mode 100644 index 000000000..c4c5e60be Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/dialler.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/startConversation.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/startConversation.png new file mode 100644 index 000000000..762cb978c Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/startConversation.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/startConversationOptions.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/startConversationOptions.png new file mode 100644 index 000000000..0f3a7a4d4 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/startConversationOptions.png differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/01.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/01.png deleted file mode 100644 index d447c6b85..000000000 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/01.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/02.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/02.png deleted file mode 100644 index 071008a45..000000000 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/02.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/03.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/03.png deleted file mode 100644 index 03b513ea4..000000000 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/03.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/04.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/04.png deleted file mode 100644 index 3e154ea82..000000000 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/04.png and /dev/null differ diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt index 4b41cb27b..cfce968a0 100644 --- a/fastlane/metadata/android/en-US/short_description.txt +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -1 +1 @@ -An encrypted, user friendly XMPP instant messaging client optimized for mobile \ No newline at end of file +Chat on the Jabber network (XMPP protocol); focus on features for gateway users diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 8c0fb64a8..7454180f2 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 162dd9b7f..4dc267f8b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Nov 14 09:59:55 CET 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionSha256Sum=a8da5b02437a60819cad23e10fc7e9cf32bcb57029d9cb277e26eeff76ce014b zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip diff --git a/gradlew b/gradlew index 91a7e269e..1b6c78733 100755 --- a/gradlew +++ b/gradlew @@ -1,79 +1,129 @@ -#!/usr/bin/env bash +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum -warn ( ) { +warn () { echo "$*" -} +} >&2 -die ( ) { +die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -82,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -90,75 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index aec99730b..ac1b06f93 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -8,20 +24,23 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,34 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/androidTest/java/com/cheogram/android/test/ScreenshotTest.java b/src/androidTest/java/com/cheogram/android/test/ScreenshotTest.java new file mode 100644 index 000000000..ce0fd62ad --- /dev/null +++ b/src/androidTest/java/com/cheogram/android/test/ScreenshotTest.java @@ -0,0 +1,169 @@ +package com.cheogram.android.test; + +import java.util.concurrent.TimeoutException; +import java.lang.Thread; +import java.util.Arrays; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import android.app.Activity; +import android.content.Intent; +import android.graphics.Bitmap; +import android.net.Uri; +import android.os.Bundle; +import android.util.Log; + +import androidx.test.InstrumentationRegistry; +import androidx.test.core.app.ActivityScenario; +import androidx.test.core.app.ApplicationProvider; +import androidx.test.ext.junit.rules.ActivityScenarioRule; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import androidx.test.rule.ServiceTestRule; +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.matcher.ViewMatchers.withId; + +import tools.fastlane.screengrab.Screengrab; +import tools.fastlane.screengrab.cleanstatusbar.CleanStatusBar; +import tools.fastlane.screengrab.locale.LocaleTestRule; + +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.entities.Contact; +import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Message; +import eu.siacs.conversations.entities.Presence; +import eu.siacs.conversations.entities.ServiceDiscoveryResult; +import eu.siacs.conversations.entities.TransferablePlaceholder; +import eu.siacs.conversations.persistance.FileBackend; +import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; +import eu.siacs.conversations.services.XmppConnectionService; +import eu.siacs.conversations.test.R; +import eu.siacs.conversations.ui.ConversationsActivity; +import eu.siacs.conversations.ui.StartConversationActivity; +import eu.siacs.conversations.xml.Element; +import eu.siacs.conversations.xmpp.Jid; +import eu.siacs.conversations.xmpp.pep.Avatar; +import eu.siacs.conversations.xmpp.stanzas.IqPacket; + +@RunWith(AndroidJUnit4.class) +public class ScreenshotTest { + + static String pkg = InstrumentationRegistry.getInstrumentation().getContext().getPackageName(); + static XmppConnectionService xmppConnectionService; + static Account account; + + @ClassRule + public static final LocaleTestRule localeTestRule = new LocaleTestRule(); + + @ClassRule + public static final ServiceTestRule xmppServiceRule = new ServiceTestRule(); + + @BeforeClass + public static void setup() throws TimeoutException { + CleanStatusBar.enableWithDefaults(); + + Intent intent = new Intent(ApplicationProvider.getApplicationContext(), XmppConnectionService.class); + intent.setAction("ui"); + xmppConnectionService = ((XmppConnectionBinder) xmppServiceRule.bindService(intent)).getService(); + account = xmppConnectionService.findAccountByJid(Jid.of("carrot@chaosah.hereva")); + if (account == null) { + account = new Account( + Jid.of("carrot@chaosah.hereva"), + "orangeandfurry" + ); + xmppConnectionService.createAccount(account); + } + + Uri avatarUri = Uri.parse("android.resource://" + pkg + "/" + String.valueOf(R.drawable.carrot)); + final Avatar avatar = xmppConnectionService.getFileBackend().getPepAvatar(avatarUri, 192, Bitmap.CompressFormat.WEBP); + xmppConnectionService.getFileBackend().save(avatar); + account.setAvatar(avatar.getFilename()); + + Contact cheogram = account.getRoster().getContact(Jid.of("cheogram.com")); + cheogram.setOption(Contact.Options.IN_ROSTER); + cheogram.setPhotoUri("android.resource://" + pkg + "/" + String.valueOf(R.drawable.cheogram)); + Presence cheogramPresence = Presence.parse(null, null, ""); + IqPacket discoPacket = new IqPacket(IqPacket.TYPE.RESULT); + Element query = discoPacket.addChild("query", "http://jabber.org/protocol/disco#info"); + Element identity = query.addChild("identity"); + identity.setAttribute("category", "gateway"); + identity.setAttribute("type", "pstn"); + cheogramPresence.setServiceDiscoveryResult(new ServiceDiscoveryResult(discoPacket)); + cheogram.updatePresence("gw", cheogramPresence); + } + + @AfterClass + public static void teardown() { + CleanStatusBar.disable(); + } + + @Test + public void testConversation() throws FileBackend.FileCopyException, InterruptedException { + Conversation conversation = xmppConnectionService.findOrCreateConversation(account, Jid.of("+15550737737@cheogram.com"), false, false); + conversation.getContact().setOption(Contact.Options.IN_ROSTER); + conversation.getContact().setSystemName("Pepper"); + conversation.getContact().setPhotoUri("android.resource://" + pkg + "/" + String.valueOf(R.drawable.pepper)); + + Message voicemail = new Message(conversation, "", 0, Message.STATUS_RECEIVED); + voicemail.setOob("https://example.com/thing.mp3"); + voicemail.setFileParams(new Message.FileParams("https://example.com/thing.mp3|5000|0|0|10000")); + voicemail.setType(Message.TYPE_FILE); + voicemail.setSubject("Voicemail Recording"); + + Message transcript = new Message(conversation, "Where are you?", 0, Message.STATUS_RECEIVED); + transcript.setSubject("Voicemail Transcription"); + + Message picture = new Message(conversation, "", 0, Message.STATUS_SEND_RECEIVED); + picture.setOob("https://example.com/thing.webp"); + picture.setType(Message.TYPE_FILE); + xmppConnectionService.getFileBackend().copyFileToPrivateStorage( + picture, + Uri.parse("android.resource://" + pkg + "/" + String.valueOf(R.drawable.komona)), + "image/webp" + ); + xmppConnectionService.getFileBackend().updateFileParams(picture); + + conversation.addAll(0, Arrays.asList( + voicemail, + transcript, + new Message(conversation, "Meow", 0, Message.STATUS_SEND_RECEIVED), + picture, + new Message(conversation, "👍", 0, Message.STATUS_RECEIVED) + )); + + ActivityScenario scenario = ActivityScenario.launch(ConversationsActivity.class); + scenario.onActivity((Activity activity) -> { + ((ConversationsActivity) activity).switchToConversation(conversation); + }); + InstrumentationRegistry.getInstrumentation().waitForIdleSync(); + Thread.sleep(100); // ImageView not paited yet after waitForIdleSync + Screengrab.screenshot("conversation"); + } + + @Test + public void testStartConversation() throws InterruptedException { + ActivityScenario scenario = ActivityScenario.launch(StartConversationActivity.class); + InstrumentationRegistry.getInstrumentation().waitForIdleSync(); + Thread.sleep(100); // ImageView not paited yet after waitForIdleSync + Screengrab.screenshot("startConversation"); + } + + @Test + public void testAddContact() throws InterruptedException { + ActivityScenario scenario = ActivityScenario.launch(StartConversationActivity.class); + onView(withId(eu.siacs.conversations.R.id.speed_dial)).perform(click()); + Screengrab.screenshot("startConversationOptions"); + + // Not actually online, so can't screenshot the gateway selector yet + /*onView(withId(eu.siacs.conversations.R.id.create_contact)).perform(click()); + InstrumentationRegistry.getInstrumentation().waitForIdleSync(); + Thread.sleep(10000); // ImageView not paited yet after waitForIdleSync + Screengrab.screenshot("addContact");*/ + } +} diff --git a/src/androidTest/res/drawable/carrot.webp b/src/androidTest/res/drawable/carrot.webp new file mode 100644 index 000000000..cf0cd1288 Binary files /dev/null and b/src/androidTest/res/drawable/carrot.webp differ diff --git a/src/androidTest/res/drawable/cheogram.png b/src/androidTest/res/drawable/cheogram.png new file mode 100644 index 000000000..ff4b5cf9c Binary files /dev/null and b/src/androidTest/res/drawable/cheogram.png differ diff --git a/src/androidTest/res/drawable/komona.webp b/src/androidTest/res/drawable/komona.webp new file mode 100644 index 000000000..19cb20d1d Binary files /dev/null and b/src/androidTest/res/drawable/komona.webp differ diff --git a/src/androidTest/res/drawable/pepper.webp b/src/androidTest/res/drawable/pepper.webp new file mode 100644 index 000000000..fd3d822f0 Binary files /dev/null and b/src/androidTest/res/drawable/pepper.webp differ diff --git a/src/cheogram/java/com/cheogram/android/ConnectionService.java b/src/cheogram/java/com/cheogram/android/ConnectionService.java index be497a8b8..0f5dfa172 100644 --- a/src/cheogram/java/com/cheogram/android/ConnectionService.java +++ b/src/cheogram/java/com/cheogram/android/ConnectionService.java @@ -22,6 +22,8 @@ import android.telecom.TelecomManager; import android.telephony.PhoneNumberUtils; import android.Manifest; + +import androidx.annotation.RequiresApi; import androidx.core.content.ContextCompat; import android.content.ComponentName; import android.content.Context; @@ -53,6 +55,7 @@ import eu.siacs.conversations.xmpp.jingle.JingleRtpConnection; import eu.siacs.conversations.xmpp.jingle.Media; import eu.siacs.conversations.xmpp.jingle.RtpEndUserState; +@RequiresApi(Build.VERSION_CODES.M) public class ConnectionService extends android.telecom.ConnectionService { public XmppConnectionService xmppConnectionService = null; protected ServiceConnection mConnection = new ServiceConnection() { @@ -99,7 +102,13 @@ public class ConnectionService extends android.telecom.ConnectionService { String tel = PhoneNumberUtils.extractNetworkPortion(rawTel); try { tel = PhoneNumberUtilWrapper.normalize(this, tel); - } catch (NumberParseException e) { + } catch (IllegalArgumentException | NumberParseException e) { + return Connection.createFailedConnection( + new DisconnectCause(DisconnectCause.ERROR) + ); + } + + if (xmppConnectionService == null) { return Connection.createFailedConnection( new DisconnectCause(DisconnectCause.ERROR) ); @@ -112,6 +121,12 @@ public class ConnectionService extends android.telecom.ConnectionService { } Account account = xmppConnectionService.findAccountByJid(Jid.of(gateway[0])); + if (account == null) { + return Connection.createFailedConnection( + new DisconnectCause(DisconnectCause.ERROR) + ); + } + Jid with = Jid.ofLocalAndDomain(tel, gateway[1]); CheogramConnection connection = new CheogramConnection(account, with, postDial); @@ -136,7 +151,7 @@ public class ConnectionService extends android.telecom.ConnectionService { @Override public void onPermissionDenied(DeniedPermissions deniedPermissions) { - connection.setDisconnected(new DisconnectCause(DisconnectCause.ERROR)); + connection.close(new DisconnectCause(DisconnectCause.ERROR)); } }); @@ -220,10 +235,10 @@ public class ConnectionService extends android.telecom.ConnectionService { if (sessionId == null || !sessionId.equals(this.sessionId)) return; if (rtpConnection == null) { this.with = with; // Store full JID of connection - rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId); + findRtpConnection(); } - setStatusHints(new StatusHints(null, gatewayIcon, null)); + String statusLabel = null; if (state == RtpEndUserState.FINDING_DEVICE) { setInitialized(); @@ -231,25 +246,30 @@ public class ConnectionService extends android.telecom.ConnectionService { setDialing(); } else if (state == RtpEndUserState.INCOMING_CALL) { setRinging(); + } else if (state == RtpEndUserState.CONNECTING) { + xmppConnectionService.setDiallerIntegrationActive(true); + setActive(); + statusLabel = getString(R.string.rtp_state_connecting); } else if (state == RtpEndUserState.CONNECTED) { xmppConnectionService.setDiallerIntegrationActive(true); setActive(); - postDial(); } else if (state == RtpEndUserState.DECLINED_OR_BUSY) { - setDisconnected(new DisconnectCause(DisconnectCause.BUSY)); + close(new DisconnectCause(DisconnectCause.BUSY)); } else if (state == RtpEndUserState.ENDED) { - setDisconnected(new DisconnectCause(DisconnectCause.LOCAL)); + close(new DisconnectCause(DisconnectCause.LOCAL)); } else if (state == RtpEndUserState.RETRACTED) { - setDisconnected(new DisconnectCause(DisconnectCause.CANCELED)); + close(new DisconnectCause(DisconnectCause.CANCELED)); } else if (RtpSessionActivity.END_CARD.contains(state)) { - setDisconnected(new DisconnectCause(DisconnectCause.ERROR)); + close(new DisconnectCause(DisconnectCause.ERROR)); } + + setStatusHints(new StatusHints(statusLabel, gatewayIcon, null)); } @Override public void onAudioDeviceChanged(AppRTCAudioManager.AudioDevice selectedAudioDevice, Set availableAudioDevices) { - if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O) return; + if (Build.VERSION.SDK_INT < 26) return; switch(selectedAudioDevice) { case SPEAKER_PHONE: @@ -269,30 +289,41 @@ public class ConnectionService extends android.telecom.ConnectionService { public void onAnswer() { // For incoming calls, a connection update may not have been triggered before answering // so we have to acquire the rtp connection object here - this.rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId); - - rtpConnection.get().acceptCall(); + findRtpConnection(); + if (rtpConnection == null || rtpConnection.get() == null) { + close(new DisconnectCause(DisconnectCause.CANCELED)); + } else { + rtpConnection.get().acceptCall(); + } } @Override public void onReject() { - this.rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId); - rtpConnection.get().rejectCall(); - setDisconnected(new DisconnectCause(DisconnectCause.LOCAL)); + findRtpConnection(); + if (rtpConnection != null && rtpConnection.get() != null) { + rtpConnection.get().rejectCall(); + } + close(new DisconnectCause(DisconnectCause.LOCAL)); + } + + // Set the connection to the disconnected state and clean up the resources + // Note that we cannot do this from onStateChanged() because calling destroy + // there seems to trigger a deadlock somewhere in the telephony stack. + public void close(DisconnectCause reason) { + setDisconnected(reason); + destroy(); + xmppConnectionService.setDiallerIntegrationActive(false); + xmppConnectionService.removeRtpConnectionUpdateListener(this); } @Override public void onDisconnect() { if (rtpConnection == null || rtpConnection.get() == null) { xmppConnectionService.getJingleConnectionManager().retractSessionProposal(account, with.asBareJid()); + close(new DisconnectCause(DisconnectCause.LOCAL)); } else { rtpConnection.get().endCall(); } - destroy(); - xmppConnectionService.setDiallerIntegrationActive(false); - xmppConnectionService.removeRtpConnectionUpdateListener( - (XmppConnectionService.OnJingleRtpConnectionUpdate) this - ); } @Override @@ -310,6 +341,12 @@ public class ConnectionService extends android.telecom.ConnectionService { if (c) postDial(); } + protected void findRtpConnection() { + if (rtpConnection != null) return; + + rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId); + } + protected void sleep(int ms) { try { Thread.sleep(ms); diff --git a/src/cheogram/java/eu/siacs/conversations/ui/MagicCreateActivity.java b/src/cheogram/java/eu/siacs/conversations/ui/MagicCreateActivity.java index 3419d8fc9..6f0386672 100644 --- a/src/cheogram/java/eu/siacs/conversations/ui/MagicCreateActivity.java +++ b/src/cheogram/java/eu/siacs/conversations/ui/MagicCreateActivity.java @@ -66,13 +66,11 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher { if (username != null && domain != null) { binding.title.setText(R.string.your_server_invitation); binding.instructions.setText(getString(R.string.magic_create_text_fixed, domain)); - binding.finePrint.setVisibility(View.INVISIBLE); binding.username.setEnabled(false); binding.username.setText(this.username); updateFullJidInformation(this.username); } else if (domain != null) { binding.instructions.setText(getString(R.string.magic_create_text_on_x, domain)); - binding.finePrint.setVisibility(View.INVISIBLE); } binding.createAccount.setOnClickListener(v -> { try { diff --git a/src/cheogram/java/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/cheogram/java/eu/siacs/conversations/ui/ManageAccountActivity.java index 0fc4757cd..3d08ac4bd 100644 --- a/src/cheogram/java/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/cheogram/java/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -3,6 +3,7 @@ package eu.siacs.conversations.ui; import android.content.ActivityNotFoundException; import android.content.ComponentName; import android.content.Intent; +import android.os.Build; import android.os.Bundle; import android.security.KeyChain; import android.security.KeyChainAliasCallback; @@ -86,6 +87,8 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda startActivity(new Intent(android.telecom.TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS)); }); + if (Build.VERSION.SDK_INT < 23) return; + outer: for (Account account : xmppConnectionService.getAccounts()) { for (Contact contact : account.getRoster().getContacts()) { diff --git a/src/cheogram/res/layout/activity_pick_server.xml b/src/cheogram/res/layout/activity_pick_server.xml index 16be52ec4..d55ea78cc 100644 --- a/src/cheogram/res/layout/activity_pick_server.xml +++ b/src/cheogram/res/layout/activity_pick_server.xml @@ -84,18 +84,6 @@ android:padding="8dp" android:src="@drawable/main_logo" /> - - diff --git a/src/cheogram/res/layout/magic_create.xml b/src/cheogram/res/layout/magic_create.xml index cc0337062..f6e0436a5 100644 --- a/src/cheogram/res/layout/magic_create.xml +++ b/src/cheogram/res/layout/magic_create.xml @@ -95,19 +95,6 @@ android:padding="8dp" android:src="@drawable/main_logo" /> - - diff --git a/src/cheogram/res/values/themes.xml b/src/cheogram/res/values/themes.xml index 052fd01d3..1eac1a82c 100644 --- a/src/cheogram/res/values/themes.xml +++ b/src/cheogram/res/values/themes.xml @@ -304,6 +304,22 @@ + + + + + +