mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Merge branch 'dev' into polling-limit
This commit is contained in:
commit
716e768dac
26
BUILDING.md
26
BUILDING.md
@ -15,11 +15,11 @@ You will need Java 8 set up on your machine.
|
|||||||
Ensure that the following packages are installed from the Android SDK manager:
|
Ensure that the following packages are installed from the Android SDK manager:
|
||||||
|
|
||||||
* Android SDK Build Tools (see buildToolsVersion in build.gradle)
|
* Android SDK Build Tools (see buildToolsVersion in build.gradle)
|
||||||
* SDK Platform (All API levels)
|
* SDK Platform (all API levels)
|
||||||
* Android Support Repository
|
* Android Support Repository
|
||||||
* Google Repository
|
* Google Repository
|
||||||
|
|
||||||
In Android studio, this can be done from the Quickstart panel, choose "Configure" then "SDK Manager". In the SDK Tools tab of the SDK Manager, make sure that the "Android Support Repository" is installed, and that the latest "Android SDK build-tools" are installed. Click "OK" to return to the Quickstart panel. You may also need to install API version 28 in the SDK platforms tab.
|
In Android studio, this can be done from the Quickstart panel. Just choose "Configure", then "SDK Manager". In the SDK Tools tab of the SDK Manager, make sure that "Android Support Repository" is installed, and that the latest "Android SDK build-tools" are installed. Click "OK" to return to the Quickstart panel. You may also need to install API version 28 in the SDK platforms tab.
|
||||||
|
|
||||||
Setting up a development environment and building from Android Studio
|
Setting up a development environment and building from Android Studio
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@ -33,27 +33,7 @@ Setting up a development environment and building from Android Studio
|
|||||||
5. Default config options should be good enough.
|
5. Default config options should be good enough.
|
||||||
6. Project initialization and building should proceed.
|
6. Project initialization and building should proceed.
|
||||||
|
|
||||||
Building Session from the command line
|
|
||||||
---------------
|
|
||||||
|
|
||||||
The following steps should help you (re)build Session from the command line once all dependencies have been acquired.
|
|
||||||
|
|
||||||
1. Checkout the session-android project source with the command:
|
|
||||||
|
|
||||||
git clone https://github.com/oxen-io/session-android.git
|
|
||||||
|
|
||||||
2. Make sure you have the [Android SDK](https://developer.android.com/sdk/index.html) installed.
|
|
||||||
3. Create a local.properties file at the root of your source checkout and add an sdk.dir entry to it. For example:
|
|
||||||
|
|
||||||
sdk.dir=/Application/android-sdk-macosx
|
|
||||||
|
|
||||||
4. Execute Gradle:
|
|
||||||
|
|
||||||
./gradlew :app:build
|
|
||||||
|
|
||||||
Contributing code
|
Contributing code
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
The bulk of the Session code can be found under src/org/thoughtcrime/securesms/loki on this repo and java/main/java/org/whispersystems/signalservice/loki on the session-android-service repo.
|
Code contributions should be sent via Github as pull requests, from feature branches [as explained here](https://help.github.com/articles/using-pull-requests).
|
||||||
|
|
||||||
Code contributions should be sent via github as pull requests, from feature branches [as explained here](https://help.github.com/articles/using-pull-requests).
|
|
||||||
|
34
NOTICE
34
NOTICE
@ -1,34 +0,0 @@
|
|||||||
TextSecure provides encrypted text messages for Android.
|
|
||||||
Copyright 2011 Whisper Systems
|
|
||||||
|
|
||||||
This software has the follow third party dependencies:
|
|
||||||
|
|
||||||
Bouncy Castle 1.42
|
|
||||||
http://www.bouncycastle.org/
|
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
ZXing
|
|
||||||
http://code.google.com/p/zxing/
|
|
||||||
Apache License 2.0
|
|
||||||
|
|
||||||
Copyright 2009 ZXing 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
|
|
||||||
|
|
||||||
http://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.
|
|
28
README.md
28
README.md
@ -10,7 +10,7 @@ Add the [F-Droid repo](https://fdroid.getsession.org/)
|
|||||||
|
|
||||||
Session integrates directly with [Oxen Service Nodes](https://docs.oxen.io/about-the-oxen-blockchain/oxen-service-nodes), which are a set of distributed, decentralized and Sybil resistant nodes. Service Nodes act as servers which store messages offline, and a set of nodes which allow for onion routing functionality obfuscating users' IP addresses. For a full understanding of how Session works, read the [Session Whitepaper](https://getsession.org/whitepaper).
|
Session integrates directly with [Oxen Service Nodes](https://docs.oxen.io/about-the-oxen-blockchain/oxen-service-nodes), which are a set of distributed, decentralized and Sybil resistant nodes. Service Nodes act as servers which store messages offline, and a set of nodes which allow for onion routing functionality obfuscating users' IP addresses. For a full understanding of how Session works, read the [Session Whitepaper](https://getsession.org/whitepaper).
|
||||||
|
|
||||||
![AndroidSession](https://i.imgur.com/0YC9TyI.png)
|
<img src="https://i.imgur.com/RSMrR1F.png" width="320" />
|
||||||
|
|
||||||
## Want to contribute? Found a bug or have a feature request?
|
## Want to contribute? Found a bug or have a feature request?
|
||||||
|
|
||||||
@ -20,33 +20,41 @@ Please search for any [existing issues](https://github.com/oxen-io/session-andro
|
|||||||
|
|
||||||
Build instructions can be found in [BUILDING.md](BUILDING.md).
|
Build instructions can be found in [BUILDING.md](BUILDING.md).
|
||||||
|
|
||||||
## Verifing signatures
|
## Translations
|
||||||
|
|
||||||
Get Kee's key and import it:
|
Want to help us translate Session into your language? You can do so at https://crowdin.com/project/session-android!
|
||||||
|
|
||||||
|
## Verifying signatures
|
||||||
|
|
||||||
|
**Step 1:**
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://raw.githubusercontent.com/oxen-io/oxen-core/master/utils/gpg_keys/KeeJef.asc
|
wget https://raw.githubusercontent.com/oxen-io/oxen-core/master/utils/gpg_keys/KeeJef.asc
|
||||||
gpg --import KeeJef.asc
|
gpg --import KeeJef.asc
|
||||||
```
|
```
|
||||||
|
|
||||||
Get the signed hash for this release, the SESSION_VERSION needs to be updated for the release you want to verify
|
**Step 2:**
|
||||||
|
|
||||||
|
Get the signed hash for this release. `SESSION_VERSION` needs to be updated for the release you want to verify.
|
||||||
|
|
||||||
```
|
```
|
||||||
export SESSION_VERSION=1.10.4
|
export SESSION_VERSION=1.10.4
|
||||||
wget https://github.com/oxen-io/session-android/releases/download/$SESSION_VERSION/signatures.asc
|
wget https://github.com/oxen-io/session-android/releases/download/$SESSION_VERSION/signatures.asc
|
||||||
```
|
```
|
||||||
|
|
||||||
Verify the signature of the hashes of the files
|
**Step 3:**
|
||||||
|
|
||||||
|
Verify the signature of the hashes of the files.
|
||||||
|
|
||||||
```
|
```
|
||||||
gpg --verify signatures.asc 2>&1 |grep "Good signature from"
|
gpg --verify signatures.asc 2>&1 |grep "Good signature from"
|
||||||
```
|
```
|
||||||
|
|
||||||
The command above should print "`Good signature from "Kee Jefferys...`"
|
The command above should print "`Good signature from "Kee Jefferys...`". If it does, the hashes are valid but we still have to make the sure the signed hashes matches the downloaded files.
|
||||||
If it does, the hashes are valid but we still have to make the sure the signed hashes matches the downloaded files.
|
|
||||||
|
|
||||||
Make sure the two commands below returns the same hash.
|
**Step 4:**
|
||||||
If they do, files are valid.
|
|
||||||
|
Make sure the two commands below returns the same hash. If they do, files are valid.
|
||||||
|
|
||||||
```
|
```
|
||||||
sha256sum session-$SESSION_VERSION-universal.apk
|
sha256sum session-$SESSION_VERSION-universal.apk
|
||||||
@ -59,6 +67,6 @@ Copyright 2011 Whisper Systems
|
|||||||
|
|
||||||
Copyright 2013-2017 Open Whisper Systems
|
Copyright 2013-2017 Open Whisper Systems
|
||||||
|
|
||||||
Copyright 2019-2020 The Loki Project
|
Copyright 2019-2021 The Loki Project
|
||||||
|
|
||||||
Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html
|
Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
## How to translate Session into new languages quickly and easily
|
|
||||||
|
|
||||||
There are people all around the world who can benefit from access to Session — and that means we need to make Session available in as many languages as possible. We’ve had a number of requests from community members wanting to help out by translating Session into currently unsupported (or only partially supported) languages. If you speak multiple languages and you want to help us make Session available in another language you speak, this guide will show you how to translate Session’s iOS and Android apps quickly and easily.
|
|
||||||
|
|
||||||
### Translating Session for iOS:
|
|
||||||
|
|
||||||
Translating Session iOS into a new language is easy! You’ll need a web browser, a plaintext editor (TextEdit on macOS or Notepad on Windows will do), and a little bit of time and patience.
|
|
||||||
|
|
||||||
#### Step 1: Retrieving English strings
|
|
||||||
- Go to [Session’s iOS GitHub page](https://github.com/loki-project/session-ios)
|
|
||||||
- In the list of folders and files, click **Session**
|
|
||||||
- Click **Meta**
|
|
||||||
- Click **Translations**
|
|
||||||
- Click **en.lproj**
|
|
||||||
- Click **localizable.strings**
|
|
||||||
- Scroll down to Line #2557 (using the line numbers on the left-hand side of the text). This line should contain the text `// MARK: - Session` (note: if this line does not contain that text, use Ctrl+F, Cmd+F, or your browser’s Find on Page function to find the line which contains that text)
|
|
||||||
- Select and copy all text from that line down to the end of the file
|
|
||||||
- Open a plaintext editor (TextEdit on macOS, Notepad on Windows, or your preferred plaintext editor) and create a new file
|
|
||||||
- Paste the text you copied earlier into this blank file
|
|
||||||
|
|
||||||
#### Step 2: Translate!
|
|
||||||
This file will now have a large number of lines of code. Each line contains 2 sets of information, both in quotation marks, like this:
|
|
||||||
|
|
||||||
`"continue_2" = "Continue";`
|
|
||||||
|
|
||||||
For each line of code, translate the word or sentence to the **right** of the equals sign into the language you are translating into. Do **not** edit the text to the **left** of the equals sign.
|
|
||||||
|
|
||||||
Once you are finished translating, save the file with a filename that specifies which language you have translated the app into, and email the file to us at support@getsession.org along with information about the language you have translated the app into. Be sure to specify in your email that you have translated the iOS app (for information on translating the Android app, see below). Our developers will then take your translation and apply it to the Session iOS app. Thank you for helping make Session more accessible for everyone!
|
|
||||||
|
|
||||||
|
|
||||||
### Translating for Android:
|
|
||||||
|
|
||||||
It’s just as easy to add new translations on Session Android! Once again, you’ll need a web browser, a plaintext editor (TextEdit on macOS or Notepad on Windows will do), and a little bit of time and patience.
|
|
||||||
|
|
||||||
#### Step 1: Retrieving English strings
|
|
||||||
- Go to [Session’s Android GitHub page](https://github.com/loki-project/session-android)
|
|
||||||
- In the list of files and folders, click **res**
|
|
||||||
- Click **values** (you will need to scroll down to find this folder; make sure you click the folder named **values** and not any of the folders named **values-xx** or with other suffixes)
|
|
||||||
- Click **strings.xml**
|
|
||||||
- Scroll down to Line #1657 (using the line numbers on the left-hand side of the text). This line should contain the text `<!-- Session -->` (note: if this line does not contain that text, use Ctrl+F, Cmd+F, or your browser’s Find on Page function to find the line which contains that text)
|
|
||||||
- Select and copy all text from that line down to the end of the file
|
|
||||||
- Open a plaintext editor (TextEdit on macOS, Notepad on Windows, or your preferred plaintext editor) and create a new file
|
|
||||||
- Paste the text you copied earlier into this blank file
|
|
||||||
|
|
||||||
#### Step 2: Translate!
|
|
||||||
This file will now have a large number of lines of code. Each line will contain `<string name=”xxx”>` and `</string>` tags. To translate Session Android, translate the text between these tags. For example:
|
|
||||||
|
|
||||||
`<string name="continue_2">Continue</string>`
|
|
||||||
|
|
||||||
In this line, translate the word **Continue** into the language you are translating into. Do not translate any other text. Do **not** translate the text inside either pair of angled brackets <>.
|
|
||||||
|
|
||||||
Translate the word or sentence between each pair of `<string></string>` tags, on each line.
|
|
||||||
|
|
||||||
Once you are finished translating, save the file with a filename that specifies which language you have translated the app into, and email the file to us at support@getsession.org along with information about the language you have translated the app into. Be sure to specify in your email that you have translated the Android app (for information on translating the iOS app, see above). Our developers will then take your translation and apply it to the Session Android app. Thank you for helping make Session more accessible for everyone!
|
|
@ -143,7 +143,7 @@ dependencies {
|
|||||||
testImplementation 'org.robolectric:shadows-multidex:4.2'
|
testImplementation 'org.robolectric:shadows-multidex:4.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
def canonicalVersionCode = 171
|
def canonicalVersionCode = 172
|
||||||
def canonicalVersionName = "1.10.8"
|
def canonicalVersionName = "1.10.8"
|
||||||
|
|
||||||
def postFixSize = 10
|
def postFixSize = 10
|
||||||
|
@ -37,14 +37,14 @@ class Contact(val sessionID: String) {
|
|||||||
* The name to display in the UI. For local use only.
|
* The name to display in the UI. For local use only.
|
||||||
*/
|
*/
|
||||||
fun displayName(context: ContactContext): String? {
|
fun displayName(context: ContactContext): String? {
|
||||||
this.nickname?.let { return it }
|
nickname?.let { return it }
|
||||||
return when (context) {
|
return when (context) {
|
||||||
ContactContext.REGULAR -> this.name
|
ContactContext.REGULAR -> name
|
||||||
ContactContext.OPEN_GROUP -> {
|
ContactContext.OPEN_GROUP -> {
|
||||||
// In open groups, where it's more likely that multiple users have the same name,
|
// In open groups, where it's more likely that multiple users have the same name,
|
||||||
// we display a bit of the Session ID after a user's display name for added context.
|
// we display a bit of the Session ID after a user's display name for added context.
|
||||||
this.name?.let {
|
name?.let {
|
||||||
return "${this.name} (...${this.sessionID.takeLast(8)})"
|
return "$name (...${sessionID.takeLast(8)})"
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user