From 08b97917a7228e1ce1c77ebcbf9574c9a7641d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 8 Dec 2020 22:05:46 +0800 Subject: [PATCH] Update README --- README.md | 134 +++++------------- TMessagesProj/build.gradle | 19 +-- .../tw/nekomimi/nekogram/NekoXPushService.kt | 9 -- 3 files changed, 43 insertions(+), 119 deletions(-) diff --git a/README.md b/README.md index 6ccffa2f2..9caa83fc8 100644 --- a/README.md +++ b/README.md @@ -1,72 +1,19 @@ # NekoX -NekoX is an open source third-party Telegram android app. +NekoX is an **open source** third-party Telegram client, based on Telegram-FOSS with features added. -- Google play store: (https://play.google.com/store/apps/details?id=nekox.messenger) -- Update news : https://t.me/NekoX-Dev +- ~~Google play store: (https://play.google.com/store/apps/details?id=nekox.messenger)~~ +- Update news : https://t.me/NekogramX - Feedback: https://github.com/NekoX-Dev/NekoX/issues -- Chat Group: https://t.me/NekoXChat -- Chat Group (Persian) : https://t.me/NekogramX_Persian -- FAQ: https://telegra.ph/NekoX-FAQ-03-31 -- FAQ (Chinese): https://telegra.ph/NekoX-%E5%B8%B8%E8%A6%8B%E5%95%8F%E9%A1%8C-03-31 +- Chat Group (English / Chinese): https://t.me/NekoXChat +- Chat Group (Persian): https://t.me/NekogramX_Persian -## Telegram-FOSS Changes: - -*Replacement of non-FOSS, untrustworthy or suspicious binaries or source code:* -- Do location sharing with OpenStreetMap(osmdroid) instead of Google Maps -- Use Twemoji emoji set instead of Apple's emoji -- Google Play Services GCM replaced with Telegram's push service -- Has to show a notification on Oreo+, ask Google -- **SECURITY:** Old BoringSSL prebuilts are replaced with the newest upstream source code built at compile time -- **SECURITY:** Old FFmpeg prebuilts are replaced with the newest upstream source code built at compile time -- **SECURITY:** Bundled libWebP is updated - -*Removal of non-FOSS, untrustworthy or suspicious binaries or source code and their functionality:* -- Google Vision face detection and barcode scanning (Passport) -- Google Wallet and Android Pay integration -- Google Voice integration -- HockeyApp crash reporting and self-updates -- Google SMS retrieval. You have to type the code manually - -*Other:* -- Allow to set a proxy before login -- Added the ability to parse locations from intents containing a `geo:,,` string -- Force static map previews from Telegram - -## Old 0penSource Nekogram Changes - -We regret that [Nekogram](https://github.com/Nekogram/Nekogram-issue-tracker) is no longer open source, but uses drklo/master to [disguise open source](https://github.com/Nekogram/Android). - -- Repeat others' message in one click. -- Save to saved messages in one click. -- Ignore messages from blocked users. -- Forward messages without quoting. -- Create a mention by user's ID. -- Allow non-admin users to view group chat permissions and administrators. -- Select a map preview provider for normal dialogs. -- Promote/restrict user directly from contextual menu clicking on user's message. -- Show user chat history in groups from contextual menu clicking on user's message. -- Delete single downloaded file. -- Customize stickers display size. -- Show and export message details. -- Unlimited favorite stickers. -- Filter chats list: users, groups, channels, bots, admin, unmuted. -- Multi-accounts (up to 8). -- Log in with bot accounts. -- Decide whether to sync contacts on first login. -- Show ID and data center. -- Transparent status bar. -- Change displaying name order. -- Hide mobile number from navigation menu drawer and settings menu. -- Built-in Chinese and Japanese language. -- Use system font and emojis. -- Store cache into app's private directory. -- Hide proxy sponsor channels. -- Toogle to show sensitive media contents in public channels. +The play store version is outdated [due to](https://developer.android.com/distribute/best-practices/develop/target-sdk) the target api level 29 is not supported yet. Otherwise, the play version won't be able to read photos and files (like other 3rd apps do). ## NekoX Changes -- Built-in Vmess, Shadowsocks, SSR, RelayBaton (ESNI) proxies support +- Most of Nekogram's features +- Built-in Vmess, Shadowsocks, SSR proxies support - Built-in public proxy list - Proxy subscription support. - Proxies import and export, remarks, speed measurement, sorting, delete unusable nodes, etc. @@ -83,6 +30,13 @@ We regret that [Nekogram](https://github.com/Nekogram/Nekogram-issue-tracker) is - Dialog sorting is optional "Unread and can be prioritized for reminding" etc. - Allow to skip "regret within five seconds" - Unblock all users support +- Login via QR code +- Scan and confirm the login QR code directly +- Allow clear application data +- Option to not send comment first when forwarding +- 0ption to use nekox chat input menu: replace record button with a menu which contains an switch to control link preview (enabled by default) +- Option to disable link preview by default: to prevent the server from knowing that the link is shared through Telegram. +- Option to ignore Android-only content restrictions (except for the Play Store version). - OpenKaychain client ( sign / verify / decrypt / import ) - Google Cloud Translate / Yandex.Translate support - Custom cache directory (supports external storage) @@ -94,12 +48,10 @@ We regret that [Nekogram](https://github.com/Nekogram/Nekogram-issue-tracker) is - Force English emoji keywords to be loaded - Add "@Name" when long press @ user option - Enhanced notification service, optional version without Google Services. +- Don't alert "Proxy unavailable" for non-current account +- Tgx style message unpin menu - Built-in Material Design themes / Telegram X style icons -## How to get Google Cloud Translate Key - -https://telegra.ph/google-cloud-trans-key-04-26 - ## Compilation Guide **NOTE: Building on Windows is, unfortunately, not supported. @@ -111,7 +63,7 @@ Consider using a Linux VM or dual booting.** It is recommended to use AndroidStudio to install. -2. Install golang ( >= 1.15 ), and add GOPATH to the PATH variable. +2. Install golang ( >= 1.15.4 ), and add GOPATH to the PATH variable. It is recommended to use gvm for the installation. if you are using the system package manager, don't forget to add environment variable. @@ -120,8 +72,8 @@ apt install -y bison gcc make bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) source "$HOME/.bashrc" -gvm install go1.15 -B -gvm use go1.15 --default +gvm install go1.15.4 -B +gvm use go1.15.4 --default ``` 3. Install rust and its stdlib for android abis, add environment variables for it. @@ -138,47 +90,27 @@ rustup target install armv7-linux-androideabi aarch64-linux-android i686-linux-a 4. Build native dependencies: `bin/native_libs.sh` 5. Build external libraries and native code: `bin/update_libs.sh` +6. Fill out `TELEGRAM_APP_ID` and `TELEGRAM_APP_HASH` in `local.properties` +7. Replace TMessagesProj/google-services.json if you want fcm to work. +8. Replace release.keystore with yours and fill out `ALIAS_NAME`, `KEYSTORE_PASS` and `ALIAS_PASS` in `local.properties` -### Specify APP_ID and APP_HASH +`./gradlew assemble[AppleEmoji|TwitterEmoji|NoEmoji]` -Fill out TELEGRAM_APP_ID and TELEGRAM_APP_HASH in local.properties +## Faq -### Build Types +#### What is the relationship between NekoX and Nekogram? -#### Debug +More features, **without** [additional trackers](https://gitlab.com/search?utf8=%E2%9C%93&snippets=false&scope=&repository_ref=master&search=AnalyticsHelper&group_id=10273976&project_id=22804922). -`./gradlew assembleDebug` +#### What is the difference between Full and Mini version? -The default debug key is used, and placing yours is not needed. +The full version comes with built-in proxy support for v2ray, shadowsocks, and shadowsocksr, which is usually provided to advanced users to help friends who have no computer knowledge in mainland China to bypass censorship, so don't complain about imperfect functions or ask to add other rare proxy types, you can use their clients directly. -#### Release +#### Proxy? I don't need -`./gradlew assembleRelease` +It is recommended that use the `Mini` version. -The difference between release and other build types is that it adds fcm and firebase crash analysis, if you don't like them, use releaseNoGcm. - -To compile the release version, please place your keysotre at TMessageProj/release.keystore, and fill in KEYSTORE_PASS, ALIAS_NAME, ALIAS_PASS in local.properties, environment variables are also recommended - -If you don't use NekoX's APP_ID and APP_HASH, you need to register a physical firebase app and replace google-services.json to ensure fcm works - -#### Foss - -`./gradlew assembleFoss` - -OK, a version without firebase cloud messaging and precompiled native libraries, maybe this makes you feel more free, or your phone does not have Google services. - -To compile the foss version, please refer to [scripts](./bin). - -### Build Variants - -Available variant list: - -`Full` -`Mini` ( without ss/ssr/v2ray proxies ) - -`AppleEmoji` -`TwitterEmoji` -`NoEmoji` +#### ## Localization @@ -188,7 +120,7 @@ Join project at https://nekox.crowdin.com/nekox.
  • Telegram-FOSS: GPLv2
  • -
  • Nekogram: GPLv2 (No longer open source)
  • +
  • Nekogram: GPLv2
  • v2rayNG: GPLv3
  • AndroidLibV2rayLite: LGPLv3
  • shadowsocks-android: GPLv3
  • diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 057238c47..89f7d6cd7 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -def verName = "7.2.1.1" -def verCode = 118 +def verName = "7.2.1.2" +def verCode = 119 def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json") @@ -40,7 +40,7 @@ configurations { def okHttpVersion = '4.9.0' def fcmVersion = '21.0.0' def crashlyticsVersion = '17.3.0' -def playCoreVersion = '1.8.3' +def playCoreVersion = '1.9.0' repositories { @@ -54,7 +54,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.5.0-alpha05' implementation 'androidx.palette:palette-ktx:1.0.0' implementation 'androidx.viewpager:viewpager:1.0.0' - implementation 'androidx.exifinterface:exifinterface:1.3.1' + implementation 'androidx.exifinterface:exifinterface:1.3.2' implementation "androidx.interpolator:interpolator:1.0.0" implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0' implementation 'androidx.multidex:multidex:2.0.1' @@ -64,7 +64,7 @@ dependencies { // TODO: fix problem with android L implementation 'com.google.zxing:core:3.4.1' - compileOnly 'org.checkerframework:checker-qual:3.7.0' + compileOnly 'org.checkerframework:checker-qual:3.8.0' compileOnly 'org.checkerframework:checker-compat-qual:2.5.5' // don't change this :) @@ -73,7 +73,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.8.6' implementation 'org.osmdroid:osmdroid-android:6.1.8' - implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.20' + implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2' implementation "com.squareup.okhttp3:okhttp:$okHttpVersion" @@ -81,8 +81,8 @@ dependencies { implementation 'dnsjava:dnsjava:3.3.1' implementation 'org.dizitart:nitrite:3.4.2' - implementation 'cn.hutool:hutool-core:5.5.1' - implementation 'cn.hutool:hutool-crypto:5.5.1' + implementation 'cn.hutool:hutool-core:5.5.2' + implementation 'cn.hutool:hutool-crypto:5.5.2' implementation 'com.jakewharton:process-phoenix:2.0.0' @@ -104,7 +104,7 @@ dependencies { android { compileSdkVersion 30 - buildToolsVersion '30.0.2' + buildToolsVersion '30.0.3' ndkVersion rootProject.ext.ndkVersion defaultConfig.applicationId = "nekox.messenger" @@ -275,6 +275,7 @@ android { debug { jniLibs.srcDir 'src/main/libs' + manifest.srcFile 'src/gservcies/AndroidManifest.xml' } releaseNoGcm { diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/NekoXPushService.kt b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/NekoXPushService.kt index 20543c0a8..a56205698 100644 --- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/NekoXPushService.kt +++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/NekoXPushService.kt @@ -1,20 +1,11 @@ package tw.nekomimi.nekogram import android.annotation.SuppressLint -import android.app.NotificationChannel -import android.app.NotificationManager -import android.app.PendingIntent -import android.content.Context -import android.content.Intent import android.os.Build -import android.provider.Settings import android.service.notification.NotificationListenerService import androidx.annotation.RequiresApi -import androidx.core.app.NotificationCompat import org.telegram.messenger.ApplicationLoader import org.telegram.messenger.KeepAliveJob -import org.telegram.messenger.LocaleController -import org.telegram.messenger.R @SuppressLint("OverrideAbstract") @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR2)