Commit Graph

181 Commits

Author SHA1 Message Date
adbenitez ce72ddd5f8 remove http/https handling from ShareActivity 2024-05-19 19:42:25 +02:00
adbenitez 8cdc361ec1 Merge remote-tracking branch 'upstream/main' 2024-05-18 17:03:55 +02:00
Asiel Díaz Benítez 6b86ebdd54 allow to share log instead of copying to clipboard (#3052)
* allow to share log instead of copying to clipboard

* fix log sharing, improve shareLog() code
2024-05-17 09:53:26 -04:00
adbenitez 7ff34ed43c Merge remote-tracking branch 'upstream/main' 2024-05-15 22:34:14 +02:00
Asiel Díaz Benítez b4322c90ee fix: allow to share attachments from one chat to another (#3031)
* fix: allow to share from one chat to another

* add comment
2024-05-08 10:27:43 -04:00
adbenitez 431ab02bf5 Merge remote-tracking branch 'upstream/main' 2024-05-07 18:15:56 +02:00
B. Petersen e2d51ca1a3 support android 4.1-4.3 again 2024-05-07 15:34:50 +02:00
B. Petersen 256c010b61 add FcmReceiveService 2024-05-07 15:34:50 +02:00
B. Petersen 3843028322 exclude analytics from FCM, cmp https://stackoverflow.com/questions/39327141/disable-the-analytics-service-for-firebase-cloud-messaging and the signal source code 2024-05-07 15:34:50 +02:00
Asiel Díaz Benítez 81b7df0f99 adapt to new "instant onboarding" UX workflow (#3015)
* rework onboarding

* implement default registration in InstantOnboardingActivity

* dismiss signInDialog after button is selected

* add footer options, implement "explore other options" button

* properly handly permissions results

* implement "scan QR" button

* fix linter warnings

* remove from observers in onDestroy()

* handle DCACCOUNT and DCLOGIN in InstantOnboardingActivity instead of WelcomeActivity

* fix identation in setProviderFromQr()

* rename DEF_CHATMAIL_HOST to DEFAULT_CHATMAIL_HOST

* Update src/org/thoughtcrime/securesms/InstantOnboardingActivity.java

Co-authored-by: bjoern <r10s@b44t.com>

* Update res/layout/instant_onboarding_activity.xml

Co-authored-by: bjoern <r10s@b44t.com>

* Update res/layout/instant_onboarding_activity.xml

Co-authored-by: bjoern <r10s@b44t.com>

* Update res/layout/instant_onboarding_activity.xml

Co-authored-by: bjoern <r10s@b44t.com>

---------

Co-authored-by: bjoern <r10s@b44t.com>
2024-05-06 08:32:35 -04:00
adbenitez d4072c81bd Merge remote-tracking branch 'upstream/main' 2024-05-06 14:31:57 +02:00
B. Petersen 9c869a9f76 remove MapActivity from manifest 2024-04-30 14:33:34 +02:00
adbenitez e24fa54bb3 Merge remote-tracking branch 'upstream/main' 2024-03-27 12:38:14 -04:00
bjoern 2faf7a640f react with any emoji (#2979)
* add button to select any reaction

* add emojipicker to build.gradle and manifest

* fix build error

* open reaction picker and send any reaction

* use RelativeLayout as parent for EmojiPickerView

* dismiss AlertDialog on emoji-selection

* reduce columns to 8 like on iOS

* disable "more reactions" button in android < 5

* show selected reactions instead of '...', this is what whatsapp, signal are doing

* make '...' a bit less bold in light mode

---------

Co-authored-by: adbenitez <asieldbenitez@gmail.com>
2024-03-27 12:33:13 -04:00
adbenitez 4c8407f6e1 add back camera permission 2024-02-11 22:41:34 -05:00
adbenitez c264daa666 remove unnecessary CAMERA permission (since built-in camera was removed)
also tweak build.gradle to avoid unnecessary metadata
2024-02-06 16:57:37 -05:00
adbenitez a414564367 Merge remote-tracking branch 'upstream/main' 2024-02-01 01:37:11 -05:00
Asiel Díaz Benítez 84b5540249 declare hasFragileUserData (#2947) 2024-02-01 01:34:04 -05:00
adbenitez 7f46e56b6d Merge remote-tracking branch 'upstream/main' 2024-01-20 01:03:15 -05:00
Asiel Díaz Benítez a1cc00a17f register to handle i.delta.chat links (#2922) 2024-01-19 23:23:17 -05:00
adbenitez 88ba4aeb9d Merge remote-tracking branch 'upstream/main' 2023-11-07 23:08:12 +01:00
adbenitez be0fdb7589 add new contact activity 2023-11-03 06:00:40 +01:00
adbenitez bace4d4da5 Merge remote-tracking branch 'upstream/main' 2023-10-12 22:46:05 +02:00
B. Petersen 9b9d2e4daa READ_EXTERNAL_STORAGE permission is still needed for <sdk33 2023-10-12 16:45:37 +02:00
adbenitez 9262c1b0cc Merge remote-tracking branch 'upstream/main' 2023-10-06 22:22:13 +02:00
B. Petersen ac1f2ebdd9 rename blocked-contacts-activity
`BlockedAndShareContactsActivity` is no longer used for sharing contacts,
this was always a misleading name
and is done since #2719 by `AttachContactActivity`.
2023-10-05 23:46:23 +02:00
adbenitez efc0d8d657 Merge remote-tracking branch 'upstream/main' 2023-10-05 01:06:40 +02:00
B. Petersen e7f8dbeb91 split off AttachContactActivity from BlockedAndShareContactsActivity 2023-10-05 00:23:17 +02:00
adbenitez 2e46725e07 Merge remote-tracking branch 'upstream/main' 2023-10-03 15:10:01 +02:00
bjoern f18831b196 set targetSdkVersion to 33 (#2649)
* set targetSdkVersion to 33

* api33 requires permission NEARBY_WIFI_DEVICES to access wifi

not sure, if this affects getSystemService(Context.WIFI_SERVICE),
however, we anyway do not ask for permissions here but just try/catch -
if things do not work, we just cannot get the wifi name

(we're not asking for permission as this would require LOCATION in the past -
and that would scare users that just installed Delta Chat
and select "Add Second Devive".
this is the exact reason why NEARBY_WIFI_DEVICES was introduced, btw.
so in case getting the Wifi name does not work on api33,
we can consider asking for a permission - would still be on startup, however)

* update storage permissions in manifest

according to https://developer.android.com/training/data-storage/shared/media#storage-permission

* also update compileSdkVersion

* api33: adapt audio permission request

* api33: adapt gallery permission request

* request correct permissions for the 'photo rail'

* request correct permissions for avatar selection

* api33: storage and audio permission not needed

* add comment wrt 'camera roll'

* add POST_NOTIFICATIONS to the manifest, this already allows to enable notifications in the system settings

* ask for POST_NOTIFICATIONS permission on startup

* explain how to re-enable notifications if initially disabled

* prefer a device message over an alert

* show in settings if notifications are system-disabled
2023-10-03 00:42:20 +02:00
adbenitez b65b535cdc allow to select as app to open .xdc files, remove zhv 2023-07-20 02:27:52 +02:00
adbenitez c944bec0b7 Merge remote-tracking branch 'upstream/master' 2023-06-27 18:33:10 +02:00
Hocuri 6b2516f8be Don't recreate WebxdcActivity when going to dark mode (#2601)
This fixes the problem that if the user sets the device to dark mode while a webxdc is open, it re-loads veeeeery slowly.
2023-06-26 11:10:26 +02:00
adbenitez 6085b7d550 Merge remote-tracking branch 'upstream/master' 2023-05-02 04:57:36 -04:00
Hocuri 0e27d445ee Rework how activities interact when forwarding/sharing (#2549) 2023-05-02 10:34:31 +02:00
adbenitez 95683fa1fd Merge remote-tracking branch 'upstream/master' 2023-05-01 15:11:43 -04:00
link2xt 8e2dd50d89 Upgrade from Gradle 7.5 to Gradle 8.0.2
Upgraded gradle plugin from 7.2.2 to 7.4.2.

Upgraded gradle wrapper with

    ./gradlew wrapper --gradle-version 8.0.2 --gradle-distribution-sha256-sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7

This command updated gradle/wrapper/gradle-wrapper.properties.
Checksum for 8.0.2 is copied from <https://gradle.org/release-checksums/>.

Replaced deprecated "package" attribute with "namespace" in build.gradle.
2023-04-14 13:08:52 +00:00
adbenitez f5e00e5484 Merge remote-tracking branch 'upstream/master' 2023-04-06 08:56:38 -04:00
adbenitez bae052d735 start with light/dark theme depending on system theme 2023-03-27 16:33:00 -04:00
adbenitez afad51e4fa Merge remote-tracking branch 'upstream/master' 2023-03-26 01:39:32 -04:00
bjoern 3cede346f3 add multi-device-setup (#2493)
* add DcBackupProvider add receiveBackup() wrappers

* add 'Add Another Device' item to settings

* add android-ifaddrs

core-rust uses getifaddrs() which is not available on android ndk.
pull in the code from https://github.com/morristech/android-ifaddrs
that provides an implementation.

* add BackupProviderActivity

* make SVG-hack reusable

* add BackupProviderFragment

* prepare scanning backup codes

* Revert "add android-ifaddrs"

This reverts commit 33b1424427620396f282805d37f8e05c67758546.

* more logging

* call receiveBackup() on scanning DC_QR_BACKUP

* Fixup for recvmmsg fallback

* protect BackupProviderActivity by system secret

* show transfer progress as provided form the core; hide qr-code once scanned

* add a permanent notification for the provider

* clarify what we are waiting for

* add a permanent notification for the receiver

* ask before finishing BackupProviderActivity

* it is fine to cancel the abort question by tapping outside the alert

* remove outdated comment from 'keep screen on'

* add and check TRANSFER_MODE

* rename BackupProviderActivity to BackupTransferActivity

* use our base activity

* start/stop IO in base activity

* use BackupTransferActivity also for scanning

* add BackupReceiverFragment

* show detailed transfer progress

* show details instead of percent during preparation, for now

* launch chatlist and remove welcome when transfer is done

* redirect to chatlist automatically after transfer succeeded

* reword

* make log accessible from send and receive activities

* bump version

* show error if backup provider creation fails

* remove unneeded format()

* show some context in the errors alerts, hide QR code sooner

* calculate transfer percentage as specified

* show a 'close' instead of a 'back' button to make visually clear, things are aborted (there is a quesion anyway)

* add option to copy backup-qr-code to clipboard

* remove vague retry statement, core will show a detailed error soon

* warn about QR codes on clipboard getting invalidated

* make basic strings translatable

* add troubleshooting menu item (once help is evolved, it may be a more visible button, may be localized, may be offline)

* rename to backup_transfer_fragment.xml

* add detailed instructions

* move 1,2,3 layout to the .xml

* fix layout

* use text size used elsewhere

* do best effort to show SSID on sending device

* make SSID code reusable for receiver

* adapt to otherwise used font style

* show ssid also for receiver

* minor refactorings

* make qr code subtitle translatable

* tune down 'same network hint' on scanning device

* add progress bar to provider

* add progress bar to receiver

* bump version

* use 'Add Second Device' wording

this seems slightly catchier as "Add Another Device"
and has less "A" esp. in "Add as Another Device" :)

also at least translation to german seems nicer ("Zweitgerät"),
most ppl will use max. two devices, but even if more,
that should still be fine.

this was also the first intuition also by other devs in their mockups,
so we'll give it a try.

* use "Exporting/Preparing/Prepared Account" wording

let's give that a try - "Account" is also widely used,
so that seems to make some sense.
even if not 100% fitting,
it seems better than introducing the new term "Collection".

* refine abort question

* Update res/layout/backup_provider_fragment.xml

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/qr/BackupProviderFragment.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/qr/BackupReceiverFragment.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/qr/BackupTransferActivity.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/qr/BackupReceiverFragment.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* remove string duplicate

* refine 1,2,3

* simplify string ids

* focus on what matters

---------

Co-authored-by: link2xt <link2xt@testrun.org>
Co-authored-by: Hocuri <hocuri@gmx.de>
2023-03-24 15:22:26 +01:00
adbenitez f04156dc9d Merge remote-tracking branch 'upstream/master' 2023-01-08 14:02:04 -05:00
bjoern fc542dbe7e tweak archive (#2441)
* basic layout of new archive-link, including icon and unread counter

* remove 'archived chats' from main menu

* vertically align elements of new archive-link

* show unread indicator also for archived chats

* show muted unread counter in grey

* use shorter label for the 'Archive' link
2023-01-05 10:37:52 +01:00
adbenitez 860f1b5b02 Merge remote-tracking branch 'upstream/master' 2022-11-01 01:43:50 -04:00
bjoern c28c72511e fix crash in share-to-delta and similar issues (#2411)
* fix crash in share-to-delta

the crash was introduced by 1.34.2 that was released for testing only.

reason is a wrong `exported` flag - it makes sense to have `exported="true"` here.

the flag was added in https://github.com/deltachat/deltachat-android/pull/2407
as needed for android12 - and i was assuming that the old default was `false`
and set that value to all missing ones.

that assumption seems to be wrong, so we should double-check all flags
changed by https://github.com/deltachat/deltachat-android/pull/2407

* set exported=true; this is the pre-android12 default in case there intent-filters
2022-10-31 21:47:47 +01:00
adbenitez 90366eeb46 fix AndroidManifest.xml 2022-10-31 03:29:18 -04:00
adbenitez 48dec04e83 Merge remote-tracking branch 'upstream/master' 2022-10-30 11:58:21 -04:00
bjoern 443ea0cd36 bump targetSdkVersion to 32 (#2407)
* bump targetSdkVersion to 32

* explicitly set `android:exported` for `indent-filter`

this is required since targetSdkVersion 31,
https://developer.android.com/guide/components/intents-filters#Receiving

as the default was `false` before,
i just explicitly set `android:exported="false"` without looking in the details
of each filter.

* update to gradle 7.2.2; this might be needed to get warnings etc.

* update androidx dependencies

at least the update of androidx.sharetarget is required because of the missing
`android:exported`; i took the chance to update all androidx depenencies.

see https://developer.android.com/jetpack/androidx/releases/appcompat
for a CHANGELOG of each dependency.

* use explicit dependency instead of transitive ones; this fixes a weird duplicate error, see https://stackoverflow.com/questions/69817925/problem-duplicate-class-androidx-lifecycle-viewmodel-found-in-modules

* work around google's poor design decision wrt FLAG_MUTABLE

instead of setting a default behavior and logging a warning,
google crashes the application when the flag is missing on newer androids.

and setting the flag for older API seems to be undefined and therefore a lot of
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M would be required each time
a PendingIntent object is constructed ...

our Util returns either the new flag or zero,
so that can just be used unconditionally on construction.

* update dependencies but exoplayer to mitigate issues with FLAG_MUTABLE

exoplayer needs more love and updating opens a can of worms;
i tested, at least in the emulator, video and voice message playback
works as usual, so let's update exoplayer if needed.
2022-10-30 16:06:24 +01:00
adbenitez e663e5e64a Merge remote-tracking branch 'upstream/master' 2022-10-03 23:58:16 -04:00
Simon Laux 05fcac819e add dclogin scheme to qr code scan (#2366)
* add dclogin scheme to qr code scan

* Update src/org/thoughtcrime/securesms/qr/QrCodeHandler.java

Co-authored-by: Asiel Díaz Benítez <asieldbenitez@gmail.com>

* Update src/org/thoughtcrime/securesms/qr/QrCodeHandler.java

Co-authored-by: bjoern <r10s@b44t.com>

* handle DCACCOUNT and DCLOGIN schemes on new intents

* keep existing function name, that is maybe not less confusing, but at least already known

Co-authored-by: bjoern <r10s@b44t.com>
Co-authored-by: Asiel Díaz Benítez <asieldbenitez@gmail.com>
2022-09-29 18:34:01 +02:00