diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 928dfd626..0466db7e7 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -23,9 +23,13 @@ Describe here the issue that you are experiencing. - list the steps - that reproduce the bug -**Actual result:** Describe here what happens after you run the steps above (i.e. the buggy behaviour) +**Actual result:** -**Expected result:** Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour) +Describe here what happens after you run the steps above (i.e. the buggy behaviour) + +**Expected result:** + +Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour) ### Screenshots @@ -33,10 +37,11 @@ Describe here the issue that you are experiencing. ### Device info + **Device:** Manufacturer Model XVI **Android version:** 0.0.0 **Session version:** 0.0.0 - +### Link to debug log diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b7c55daee..efa0e2bcb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,7 +23,7 @@ If applicable, add screenshots or logs to help explain your problem. - Device: [e.g. Samsung Galaxy S8] - OS: [e.g. Android Pie] - - Version of Loki Messenger or latest commit hash + - Version of Session or latest commit hash **Additional context** diff --git a/AndroidManifest.xml b/AndroidManifest.xml index bfa2c456d..df2bebd0b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -47,6 +47,7 @@ + @@ -112,6 +113,9 @@ android:name="org.thoughtcrime.securesms.loki.redesign.activities.DisplayNameActivity" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize" /> + + + + + + diff --git a/BUILDING.md b/BUILDING.md new file mode 100644 index 000000000..a9c3f96dc --- /dev/null +++ b/BUILDING.md @@ -0,0 +1,66 @@ +Building Session +=============== + +Basics +------ + +Session uses [Gradle](http://gradle.org) to build the project and to maintain +dependencies. However, you needn't install it yourself; the +"gradle wrapper" `gradlew`, mentioned below, will do that for you. + +Building Session +--------------- + +The following steps should help you (re)build Session from the command line. + +1. Checkout the session-android project source with the command: + + git clone https://github.com/loki-project/session-android.git + +2. Make sure you have the [Android SDK](https://developer.android.com/sdk/index.html) installed. +3. Ensure that the following packages are installed from the Android SDK manager: + * Android SDK Build Tools (see buildToolsVersion in build.gradle) + * SDK Platform (All API levels) + * Android Support Repository + * Google Repository +4. 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 + +5. Using Java 8 + +6. Execute Gradle: + + ./gradlew build + +Visual assets +---------------------- + +Source assets tend to be large binary blobs, which are best stored outside of git repositories. Some source files are SVGs that can be auto-colored and sized using a tool like [android-res-utils](https://github.com/sebkur/android-res-utils). + +Sample command for generating our audio placeholder image: + +```bash +pngs_from_svg.py ic_audio.svg /path/to/Session/res/ 150 --color #000 --opacity 0.54 --suffix _light +pngs_from_svg.py ic_audio.svg /path/to/Session/res/ 150 --color #fff --opacity 1.00 --suffix _light +``` + +Setting up a development environment +------------------------------------ + +[Android Studio](https://developer.android.com/sdk/installing/studio.html) is the recommended development environment. + +1. Install Android Studio. +2. Open Android Studio. On a new installation, the Quickstart panel will appear. If you have open projects, close them using "File > Close Project" to see the Quickstart panel. +3. From the Quickstart panel, choose "Configure" then "SDK Manager". +4. 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. +5. From the Quickstart panel, choose "Checkout from Version Control" then "git". +6. Paste the URL for the session-android project when prompted (https://github.com/loki-project/session-android.git). +7. Android studio should detect the presence of a project file and ask you whether to open it. Click "yes". +9. Default config options should be good enough. +9. Project initialisation and build should proceed. + +Contributing code +----------------- + +Code contributions should be sent via github as pull requests, from feature branches [as explained here](https://help.github.com/articles/using-pull-requests). diff --git a/README.md b/README.md index 2fac36fe4..d1578d60d 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ ## Summary -Session integrates directly with [Loki Service Nodes](https://lokidocs.com/ServiceNodes/SNOverview/), 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 [Loki Service Nodes](https://lokidocs.com/ServiceNodes/SNOverview/), 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) ## Want to Contribute? Found a Bug or Have a feature request? -Please search for any [existing issues](https://github.com/loki-project/session-android/issues) that describe your bugs in order to avoid duplicate submissions. Submissions can be made by making a pull request to our development branch. If you don't know where to start contributing , try reading the Github issues page for ideas. +Please search for any [existing issues](https://github.com/loki-project/session-android/issues) that describe your bugs in order to avoid duplicate submissions. Submissions can be made by making a pull request to our development branch. If you don't know where to start contributing, try reading the Github issues page for ideas. ## Build instruction diff --git a/build.gradle b/build.gradle index 41e2ac5d3..392ad467f 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,8 @@ buildscript { ext.kovenant_version = "3.3.0" ext.identicon_version = "v11" ext.rss_parser_version = "2.0.4" + ext.google_services_version = "4.3.3" + ext.firebase_messaging_version = "18.0.0" repositories { mavenLocal() @@ -16,6 +18,7 @@ buildscript { classpath "com.android.tools.build:gradle:$gradle_version" classpath files('libs/gradle-witness.jar') classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "com.google.gms:google-services:$google_services_version" } } @@ -24,6 +27,7 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' apply plugin: 'witness' apply plugin: 'kotlin-kapt' +apply plugin: 'com.google.gms.google-services' repositories { mavenLocal() @@ -87,6 +91,8 @@ dependencies { implementation 'android.arch.lifecycle:extensions:1.1.1' implementation 'android.arch.lifecycle:common-java8:1.1.1' + implementation "com.google.firebase:firebase-messaging:$firebase_messaging_version" + implementation 'com.google.android.exoplayer:exoplayer-core:2.9.1' implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.1' @@ -184,8 +190,8 @@ dependencies { implementation "com.github.ybq:Android-SpinKit:1.4.0" } -def canonicalVersionCode = 48 -def canonicalVersionName = "1.0.11" +def canonicalVersionCode = 49 +def canonicalVersionName = "1.1.0" def postFixSize = 10 def abiPostFix = ['armeabi-v7a' : 1, diff --git a/res/drawable/pn_option_background.xml b/res/drawable/pn_option_background.xml new file mode 100644 index 000000000..b43e8de34 --- /dev/null +++ b/res/drawable/pn_option_background.xml @@ -0,0 +1,15 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/pn_option_background_deselect_transition.xml b/res/drawable/pn_option_background_deselect_transition.xml new file mode 100644 index 000000000..7fcb8e116 --- /dev/null +++ b/res/drawable/pn_option_background_deselect_transition.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/res/drawable/pn_option_background_select_transition.xml b/res/drawable/pn_option_background_select_transition.xml new file mode 100644 index 000000000..21c58cf71 --- /dev/null +++ b/res/drawable/pn_option_background_select_transition.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/res/drawable/pn_option_background_selected.xml b/res/drawable/pn_option_background_selected.xml new file mode 100644 index 000000000..56d1ed983 --- /dev/null +++ b/res/drawable/pn_option_background_selected.xml @@ -0,0 +1,15 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/layout-sw400dp/activity_pn_mode.xml b/res/layout-sw400dp/activity_pn_mode.xml new file mode 100644 index 000000000..8edc9267d --- /dev/null +++ b/res/layout-sw400dp/activity_pn_mode.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +