briar issueshttps://code.briarproject.org/briar/briar/-/issues2023-02-23T10:15:44Zhttps://code.briarproject.org/briar/briar/-/issues/1230Adding contacts remotely2023-02-23T10:15:44ZakwizgranAdding contacts remotelyUmbrella ticket for adding contacts remotely (sponsor 1, objective 1).Umbrella ticket for adding contacts remotely (sponsor 1, objective 1).Android 1.4https://code.briarproject.org/briar/briar/-/issues/1562Improve handling of external intents2022-05-26T15:49:41ZTorsten GroteImprove handling of external intentsUse `ENTRY_ACTIVITY` from !1087 as a central router for external intents:
> Not signed into Briar. The password screen is shown, then after signing in the remote contact activity is shown, as expected. The contact's link field is empty....Use `ENTRY_ACTIVITY` from !1087 as a central router for external intents:
> Not signed into Briar. The password screen is shown, then after signing in the remote contact activity is shown, as expected. The contact's link field is empty. If I use the up button to navigate away from the remote contact screen or the pending contact list, the task is closed. I'd expect to navigate to the contact list when pressing the up button. If I don't use the up button to navigate away, then later reopen Briar from the foreground notification, a second Briar task is created. I assume the same would happen with private message notifications, etc - the issue being that the notification expects us to have a task that can be reused by clearing the stack down to NavDrawerActivity, but the existing task doesn't have that activity in its stack.
There's also some other issues with AddContactActivity to resolve:
> If an instance of AddContactActivity already exists it's brought to the foreground but the link isn't populated (I'm assuming this is because the new intent is delivered without calling onCreate() again).
>
> If I open the remote contact activity via the speed dial, then put Briar into the background via the home button and relaunch via the ongoing notification, the contact list appears as expected. But when I back out, the remote contact activity and another instance of the contact list are underneath.
>
> Similarly, if I open the remote contact activity with a share intent, then press the home button, relaunch via the ongoing notification, and back out of the contact list, the remote contact activity is underneath (but without the second instance of the contact list).
>
> Finally, if I open the remote contact activity with a share intent, then back out or press the up button, the task is cleared. If I relaunch via recent apps, the remote contact activity is shown again. Backing out or pressing the up button clears the task again, so I can't reach the rest of the app!
Android 1.2Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1237Image attachments2022-04-19T11:28:49ZakwizgranImage attachmentsUmbrella ticket for image attachments (sponsor 1, objective 2).Umbrella ticket for image attachments (sponsor 1, objective 2).Android 1.4https://code.briarproject.org/briar/briar/-/issues/1468Restrict size of image attachments2021-06-28T08:08:18ZTorsten GroteRestrict size of image attachmentsWe can not process images of arbitrary size, because the device may lack the memory to load the entire image into it or because the maximum texture size is smaller than the image.
* [x] don't read entire images in memory
* [x] scale ful...We can not process images of arbitrary size, because the device may lack the memory to load the entire image into it or because the maximum texture size is smaller than the image.
* [x] don't read entire images in memory
* [x] scale full screen images down to screen size to avoid exceeding max texture size
* [x] add tests for [MarkEnforcingInputStream](https://github.com/bumptech/glide/blob/ad33b8d503024c8a3a6a3da60ce28c4d7732ae58/library/src/main/java/com/bumptech/glide/util/MarkEnforcingInputStream.java)
* [x] tests for our own code that handles the various image types and edge cases
* [x] limit our supported mime types to image/gif, image/jpeg and image/png
* [x] limit the size of images that can be sent
Subtask of #1237.Android 1.3Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1243User testing for image attachments2020-11-18T21:51:14ZakwizgranUser testing for image attachmentsSubtask of #1237.Subtask of #1237.Android 1.3Renata GegajRenata Gegajhttps://code.briarproject.org/briar/briar/-/issues/1438Implement UX for sending image attachments2020-11-16T10:11:30ZTorsten GroteImplement UX for sending image attachmentsWhen the message field is empty, there's an image icon to attach an image:
![Image_Attachment_Preselection](/uploads/cfaa2500f2d39f3b4e9c540d8ce46b88/Image_Attachment_Preselection.png)
Clicking it opens the system file selector:
![Ima...When the message field is empty, there's an image icon to attach an image:
![Image_Attachment_Preselection](/uploads/cfaa2500f2d39f3b4e9c540d8ce46b88/Image_Attachment_Preselection.png)
Clicking it opens the system file selector:
![Image_Attachment_Selection__System_](/uploads/97ad63158569fd22d7dc35b28453e6e4/Image_Attachment_Selection__System_.png)
If chosen image is shown as a preview, with an option to cancel the operation and to add an image caption:
![Confirmation](/uploads/621ca864593e0670f654ebdc832fbf48/Confirmation.png)
A seascape image shows a black/grey or color picked from the image on the sides:
![Confirmation_Tall_Image](/uploads/9ca88cffecbed1ee167835ba5efdd167/Confirmation_Tall_Image.png)
Subtask of #1237.Android 1.3Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1592Improve handling of missing attachments in UI2020-10-30T16:20:25ZakwizgranImprove handling of missing attachments in UIWhen MessagingManager#getAttachment() throws NoSuchMessageException, the UI should try to display any attachments that have been received so far, without doing anything that may prevent the missing attachment from being displayed correct...When MessagingManager#getAttachment() throws NoSuchMessageException, the UI should try to display any attachments that have been received so far, without doing anything that may prevent the missing attachment from being displayed correctly when it arrives (e.g. caching an incomplete list of AttachmentItems).
Subtask of #1438.Android 1.3Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1636Compression of small images throws exception2020-01-08T16:06:41ZTorsten GroteCompression of small images throws exceptionWhen sending images on Android 10 (did not test other versions) smaller than 32KB, the app shows an error and an `IOException` is thrown.
```java
if (!bitmap.compress(JPEG, quality, out))
throw new I...When sending images on Android 10 (did not test other versions) smaller than 32KB, the app shows an error and an `IOException` is thrown.
```java
if (!bitmap.compress(JPEG, quality, out))
throw new IOException();
```
Sending images larger than 32 KB works just fine.Android 1.3Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1434Implement backend for sending and receiving image attachments2019-11-12T13:45:59ZTorsten GroteImplement backend for sending and receiving image attachments### Receiving Image Attachments
Private message headers will include a list of attachments, and there will be a `MessagingManager` method for loading an attachment, which will include the attachment data as a `ByteBuffer`, later to be c...### Receiving Image Attachments
Private message headers will include a list of attachments, and there will be a `MessagingManager` method for loading an attachment, which will include the attachment data as a `ByteBuffer`, later to be converted to an `InputStream` if we find that loading images into ByteBuffers won't scale.
This implies that private message headers (in the sense of headers belonging to the private messaging client) will no longer correspond to the root class `PrivateMessageHeader` (from which all one-to-one headers currently inherit). The root class may need to be renamed, and some refactoring of the code that handles that hierarchy will be needed.
### Sending Image Attachments
*TODO*: MessagingManager API for creating local messages with optional attachmentsAndroid 1.3Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1638Image support not updated while conversation is open2019-11-06T17:55:06ZTorsten GroteImage support not updated while conversation is open[User testing has identified an issue](https://code.briarproject.org/briar/briar/issues/1243#note_38091) that the conversation does not update its image support status when this becomes available while the conversation is already open.[User testing has identified an issue](https://code.briarproject.org/briar/briar/issues/1243#note_38091) that the conversation does not update its image support status when this becomes available while the conversation is already open.Android 1.3akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1565UX for handling duplicate handshake links2019-10-16T16:19:19ZakwizgranUX for handling duplicate handshake linksIf Mallory knows Bob's handshake link, she may send it to Alice pretending it's Mallory's own link, in order to discover whether Alice and Bob are contacts/pending contacts.
When adding a pending contact we should check whether a contac...If Mallory knows Bob's handshake link, she may send it to Alice pretending it's Mallory's own link, in order to discover whether Alice and Bob are contacts/pending contacts.
When adding a pending contact we should check whether a contact/pending contact with the same handshake public key exists. If so, we should ask the user whether the new pending contact and the existing contact/pending contact are the same person. If yes, we discard the new pending contact. If no, we tell the user that two contacts sent the same link, which could mean that one of them is trying to discover who the user's contacts are, and we warn the user not to tell either or them that someone else sent the same link. Then we discard the new pending contact.
If we support more than one link format in future, Mallory may change the format of Bob's link before sending it to Alice, so we should compare the parsed public keys or public key hashes rather than the unparsed links.
Subtask of #1230.Android 1.2Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1585Add support for image attachments to messaging client2019-10-09T12:19:18ZakwizgranAdd support for image attachments to messaging clientAndroid 1.3akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1594Preview fails to load when sending second message with attachments2019-10-09T12:18:24ZakwizgranPreview fails to load when sending second message with attachmentsAfter sending a message with an attachment, I'm unable to send a second message with an attachment because the preview fails to load.
Test device: Honor 8A (Android 9).After sending a message with an attachment, I'm unable to send a second message with an attachment because the preview fails to load.
Test device: Honor 8A (Android 9).Android 1.3akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1236Update manual for adding contacts remotely2019-10-09T12:16:03ZakwizgranUpdate manual for adding contacts remotelySubtask of #1230.Subtask of #1230.Android 1.2Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1583Remote contact layout is too tall for small screens2019-09-27T14:58:54ZakwizgranRemote contact layout is too tall for small screensThe layouts for LinkExchangeFragment and NicknameFragment don't work well on small screens: for LinkExchangeFragment the Continue button is mostly offscreen, and for NicknameFragment the nickname field and Add Contact button are entirely...The layouts for LinkExchangeFragment and NicknameFragment don't work well on small screens: for LinkExchangeFragment the Continue button is mostly offscreen, and for NicknameFragment the nickname field and Add Contact button are entirely offscreen, making it unclear what the user's meant to do next.
Screenshots come from the Huawei Ascend Y330 (480x800 px).
![device-2019-06-08-101532](/uploads/83053a95ddee99302b91b0b79c659113/device-2019-06-08-101532.png)
![device-2019-06-08-101545](/uploads/33ff8c3896463d1be367479d956b781b/device-2019-06-08-101545.png)
Possible workarounds:
* Scroll to the bottom of each fragment when it's opened
* Remove the illustration from NicknameActivity or make it smaller
* Move the stepper to the bottom, below the button (I know we decided it was better at the top, and apart from this issue I'd prefer to keep it there)
* Divide the workflow into three steps rather than two: send link, enter link, and enter nickname (this has disadvantages for the flows where the user opens the activity by sharing a link from another app, or with a link already in the clipboard)Android 1.2Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1606ClassCastException when opening conversation with contact who supports images2019-06-28T13:28:39ZakwizgranClassCastException when opening conversation with contact who supports images* Android version: 9
* Phone model: Xiaomi Mi A1
* Briar version: 1.1.7 (37d0b61)
Stacktrace:
```
java.lang.ClassCastException: org.briarproject.briar.android.view.TextSendController cannot be cast to org.briarproject.briar.android.view...* Android version: 9
* Phone model: Xiaomi Mi A1
* Briar version: 1.1.7 (37d0b61)
Stacktrace:
```
java.lang.ClassCastException: org.briarproject.briar.android.view.TextSendController cannot be cast to org.briarproject.briar.android.view.TextAttachmentController
at org.briarproject.briar.android.conversation.ConversationActivity.showImageOnboarding(ConversationActivity.java:730)
at org.briarproject.briar.android.conversation.ConversationActivity.lambda$tKsX2hu-pmpHBYdC5ev_sWoOCXk(Unknown Source:0)
at org.briarproject.briar.android.conversation.-$$Lambda$ConversationActivity$tKsX2hu-pmpHBYdC5ev_sWoOCXk.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
```
The crash is caused by failing to check the image attachments feature flag before calling showImageOnboarding(). This is fixed on master but will happen for Briar 1.1.7 (and possibly some earlier releases) when contacts upgrade to a version that supports image attachments, including 1.2 and 1.3 alpha releases.
Fortunately I've found a sneaky workaround: we bump the client minor version to 2. Briar 1.1.7 only considers that a contact supports image attachments if the minor version is exactly 1 (this is also fixed on master, but fortunately didn't make it into the 1.1.7 release).Android 1.3akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1590IllegalStateException: Cannot invoke setValue on a background thread2019-06-18T11:58:53ZakwizgranIllegalStateException: Cannot invoke setValue on a background threadCrashed when sending a message to a new contact.
Stacktrace:
```
java.lang.IllegalStateException: Cannot invoke setValue on a background thread
at android.arch.lifecycle.LiveData.assertMainThread(LiveData.java:435)
at androi...Crashed when sending a message to a new contact.
Stacktrace:
```
java.lang.IllegalStateException: Cannot invoke setValue on a background thread
at android.arch.lifecycle.LiveData.assertMainThread(LiveData.java:435)
at android.arch.lifecycle.LiveData.setValue(LiveData.java:279)
at android.arch.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33)
at org.briarproject.briar.android.attachment.AttachmentCreator.resetState(AttachmentCreator.java:183)
at org.briarproject.briar.android.attachment.AttachmentCreator.onAttachmentsSent(AttachmentCreator.java:164)
at org.briarproject.briar.android.conversation.ConversationViewModel.storeMessage(ConversationViewModel.java:295)
at org.briarproject.briar.android.conversation.ConversationViewModel.lambda$createMessage$8$ConversationViewModel(ConversationViewModel.java:286)
at org.briarproject.briar.android.conversation.-$$Lambda$ConversationViewModel$1LsoWDT2XwB7wPxBWawY1IIRFR0.run(Unknown Source:10)
at org.briarproject.bramble.TimeLoggingExecutor.lambda$execute$0$TimeLoggingExecutor(TimeLoggingExecutor.java:36)
at org.briarproject.bramble.-$$Lambda$TimeLoggingExecutor$Bqrtbsq_8LcRPoTWBOef6xh7gJg.run(Unknown Source:6)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:784)
```
This is my fault - I recommended moving the onAttachmentsSent() call to a place that's on the UI thread on my branch, forgetting that it's on the crypto executor on master.Android 1.2akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1587Add version negotiation to sync protocol2019-06-18T11:58:45ZakwizgranAdd version negotiation to sync protocolAdd a record to the sync protocol that tells the remote peer which versions of the protocol the local peer supports. Send this record at the start of every session. Remember the last set of versions received from the remote peer and use ...Add a record to the sync protocol that tells the remote peer which versions of the protocol the local peer supports. Send this record at the start of every session. Remember the last set of versions received from the remote peer and use them to decide which records we can send.
Subtask of #1434.Android 1.3akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1254Headless server/desktop app2019-06-18T11:50:21ZakwizgranHeadless server/desktop appUmbrella ticket for sponsor 1, objective 5.
Outstanding Tasks:
* [x] add command line options for things like controlling log verbosity, port to bind to, etc.
* [x] research better input validation options
* [x] unit tests for all con...Umbrella ticket for sponsor 1, objective 5.
Outstanding Tasks:
* [x] add command line options for things like controlling log verbosity, port to bind to, etc.
* [x] research better input validation options
* [x] unit tests for all controllers
* [x] REST API authentication with bearer token (maybe optional, or only when not bound to localhost?)
* [x] Websocket API authentication (problematic since JavaScript can't control headers in request)
* [x] simple API documentation in README.md
* [x] add support for adding contacts (blocked by missing support in core)Headless MVPTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1580Warn when adding pending contact with Tor disabled2019-06-18T09:54:35ZTorsten GroteWarn when adding pending contact with Tor disabledAdding contacts remotely won't work with the Tor plugin not running. We should notify contacts when that is the case, so they can go online or enable Tor.Adding contacts remotely won't work with the Tor plugin not running. We should notify contacts when that is the case, so they can go online or enable Tor.Torsten GroteTorsten Grote