Git Product home page Git Product logo

mixinnetwork / android-app Goto Github PK

View Code? Open in Web Editor NEW
443.0 24.0 95.0 235.64 MB

📱 Android private messenger, crypto wallet and light node to Mixin Network

Home Page: https://play.google.com/store/apps/details?id=one.mixin.messenger

License: GNU General Public License v3.0

Kotlin 83.53% Java 12.20% HTML 0.02% CMake 0.02% C 3.11% C++ 0.68% Ruby 0.01% Shell 0.01% CSS 0.39% JavaScript 0.04%
kotlin android jetpack end-to-end-encryption blockchain androidx

android-app's Introduction

Mixin Android app

Mixin Android messenger, crypto wallet and light node to the Mixin Network

Summary

  • Written in Kotlin
  • Uses Jetpack: Room, LiveData, Paging, Lifecycle and ViewModel
  • Uses Hilt for dependency injection

Development setup

Code style

This project uses ktlint

android-app's People

Contributors

boyan01 avatar cedricfung avatar crossle avatar dearzhai avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar ichitam avatar seniorzhai avatar technillogue avatar tougee avatar yeungkc avatar zhdhr0000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-app's Issues

有个bug

打开扫描界面后退出等一会儿就蹦了

Publish apksigner output & remove not needed files in META-INF

In order to verify direct APK download from github/google-play/(mirror/download)-websites the output from apksigner is needed.
see for example the verification section in aegis app:
https://github.com/beemdevelopment/Aegis#verification

Running apksigner (Command: apksigner verify --print-certs --verbose 320100.apk) on apk downloaded from github:
https://github.com/MixinNetwork/android-app/releases/download/v0.32.1/320100.apk
sha256sum: 46342aab01445b09d19cb1b3dd6c5f13a757d050d5112c519a19a55ae37e4652

Result:

Verifies
Verified using v1 scheme (JAR signing): true
Verified using v2 scheme (APK Signature Scheme v2): true
Verified using v3 scheme (APK Signature Scheme v3): true
Verified using v4 scheme (APK Signature Scheme v4): false
Verified for SourceStamp: true
Number of signers: 1
Signer #1 certificate DN: CN=Android, OU=Android, O=Google Inc., L=Mountain View, ST=California, C=US
Signer #1 certificate SHA-256 digest: 02fb466874975338337ec00ab80b95b623c057814356b2ea3fa3f57578f81ab6
Signer #1 certificate SHA-1 digest: 8da0fc40e504fc2c533c527292c63af226d46e67
Signer #1 certificate MD5 digest: 073c2a74a5c5d6ba2fe43351fb6d95ad
Signer #1 key algorithm: RSA
Signer #1 key size (bits): 4096
Signer #1 public key SHA-256 digest: 8063aa2ebcc8c31931a37b79d5f7e0b668a1a546edb3bb51bb3d9b9160fed973
Signer #1 public key SHA-1 digest: 3127e65d3e1daac7f89db579f604360a0245a444
Signer #1 public key MD5 digest: a92d6cd0c8bff7d7d8b4670c994eccbe
Source Stamp Signer certificate DN: CN=Android, OU=Android, O=Google Inc., L=Mountain View, ST=California, C=US
Source Stamp Signer certificate SHA-256 digest: 3257d599a49d2c961a471ca9843f59d341a405884583fc087df4237b733bbd6d
Source Stamp Signer certificate SHA-1 digest: b1af3a0bf998aeede1a8716a539e5a59da1d86d6
Source Stamp Signer certificate MD5 digest: 577b8a9fbc7e308321aec6411169d2fb
Source Stamp Signer key algorithm: RSA
Source Stamp Signer key size (bits): 4096
Source Stamp Signer public key SHA-256 digest: 4c53c1d28f2ecceadcb1351603f0b702615b3454b6e30070de759359f241b802
Source Stamp Signer public key SHA-1 digest: 188b067a9ee881bde55dabe0f8f7ecb320b1a091
Source Stamp Signer public key MD5 digest: 965afac83f033aa037a54482eb6922d5
WARNING: META-INF/services/io.jsonwebtoken.CompressionCodec not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/io.jsonwebtoken.io.Deserializer not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/io.jsonwebtoken.io.Serializer not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/kotlinx.coroutines.CoroutineExceptionHandler not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/kotlinx.coroutines.internal.MainDispatcherFactory not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.

All the files in WARNING should be removed or moved to other directory, it's not much problematic because apk also signed with v2, when v1 verification is used (which is deprecated from 2016) the files in WARNING are not authenticated ("Unauthorized modifications to this JAR entry will not be detected.")

They probably should be removed, which can be done for example by adding exclude lines to packagingOptions in build.gradle file.

see related question on stackoverflow for info on removing such files:
https://stackoverflow.com/questions/66897483/how-can-i-exclude-all-files-in-meta-inf-except-for-the-three-signature-files

编译失败

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  /Users/xingxing/androidGithubProject/android-app/app/src/nullnull/debug/google-services.json
  /Users/xingxing/androidGithubProject/android-app/app/src/debug/nullnull/google-services.json
  /Users/xingxing/androidGithubProject/android-app/app/src/nullnull/google-services.json
  /Users/xingxing/androidGithubProject/android-app/app/src/debug/google-services.json
  /Users/xingxing/androidGithubProject/android-app/app/src/nullnullDebug/google-services.json
  /Users/xingxing/androidGithubProject/android-app/app/google-services.json

感觉是缺少了google-services.json文件😂😂

Cannot withdraw to a BNB address without a Memo

Describe the bug
When attempting to withdraw to a BNB address, and selecting "No Memo", it disallows this, giving an error about the memo format.

To Reproduce
Steps to reproduce the behavior:

  1. Add a BNB address
  2. Type in a valid bnb address code.
  3. Select "No Memo"
  4. Press "Save"
  5. See error message

Expected behavior
The address is added

Smartphone (please complete the following information):

  • Device: Pixel 5
  • OS: Latest Android
  • Version: Mixin messenger 0.32.8

Improve open the conversation speed

We use Paging2 for page the conversation message, It's use LimitOffsetDataSource for the Datasource, the Datasource need count the whole conversation message, we need use ScrollingCursor for the Datasource, avoid the count.

Can't clear storage for a conversation

Describe the bug
Clear storage for a conversation with a large usage(7GB) will run forever.

Smartphone (please complete the following information):

  • Device: Galaxy S10
  • OS: Android 10
  • Version 0.24.10

想问下,您项目中 signal 中的prekeycount怎么维护的

  1. 什么时候请求服务器,查询补充的count数量
  2. 服务器应该给多少 count

val response = signalKeyService.getSignalKeyCount().execute().body()
if (response != null && response.isSuccess && response.data != null) {
val availableKeyCount = response.data!!.preKeyCount
if (availableKeyCount >= PREKEY_MINI_NUM) {
return
}
refresh()
}

Remove android.enableJetifier line from gradle.properties

android.enableJetifier=true

See this guide for the steps to ensure it's safe to remove above line android.enableJetifier=true (check that all deps are already fully migrated to AndroidX, and migrate the ones still not migrated to it)
https://medium.com/dipien/say-bye-bye-to-android-jetifier-a7e0d388f5d6

Also remove line:

classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10'

Improve mark read speed

When into the conversation, back to the conversion list page, the unread number did not disappear immediately.

Submit App to F-Droid

F-Droid URL: https://f-droid.org/
F-Droid Wikipedia: https://www.wikipedia.org/wiki/F-Droid

Contribution/Submit Applications: https://f-droid.org/en/contribute/#submit-applications
Inclusion Policy: https://f-droid.org/en/docs/Inclusion_Policy
Request For Packaging Tickets: https://gitlab.com/fdroid/rfp/issues

F-Droid is application & app store for android apps (alternative to Google Play) that accepts only FLOSS (free/libre and open-source) apps and doesn't require any account creation/login in order to download apps.

The requirements for being included into f-droid are here: https://f-droid.org/en/docs/Inclusion_Policy/

The process for getting an app published to f-droid is outlined here: https://f-droid.org/en/docs/Inclusion_How-To/ https://gitlab.com/fdroid/rfp#submission-queue https://gitlab.com/fdroid/fdroiddata/blob/master/CONTRIBUTING.md

You can open a RFP (Request For Packaging) ticket here: https://gitlab.com/fdroid/rfp or an user can do so, provided you agree to include this app in F-droid (a comment to this issue is enough for it)

Some users don't have play-store on their devices as they are degoogled devices or don't create/use google account (using aurora store app https://auroraoss.com/ in anonymous mode (which is available on f-droid) is solution to still get apps from google-play) or using OS/custom ROMs that don't have it included, such as: (Some bundle f-droid by default)

https://grapheneos.org/ GrapheneOS
https://calyxos.org/ CalyxOS
https://lineageos.org/ LineageOS
https://lineage.microg.org/ LineageOS for microG
https://e.foundation/ /e/
https://www.replicant.us/ Replicant

Downloading APKs from official places like github releases or website, or from unofficial sources like APK downloading sites https://apk.support or https://apkpure.com/ etc... will avoid the play-store/google dependency but it's lack automatic update mechanism unless it's built in into the application, F-Droid solve this.

Once the app is published into f-droid add the below image code into
README.md to show that the app available on f-droid:
Get it on F-Droid
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80">](https://f-droid.org/en/packages/org.fdroid.fdroid/)

tee功能实现方式

请问你们的应用是怎么调用tee相关的呢?看到你们相关宣传中有tee介绍相关的,请教下如何在应用层面调用tee相关功能。

通过scheme打开mixin客户端异常

Step 1: Are you in the right place?

Step 2: Describe your environment

  • Device: _____OnePlus 3T
  • OS version: _____android 8.0.0
  • App version: _____0.6.0

Step 3: Describe the problem:

通过sheme打开mixin客户端异常,打开的是一个透明页面,只看到系统的status bar发生变化

Steps to reproduce:

  1. _____在第三方app里面通过scheme mixin://users/7000101276打开mixin客户端
  2. _____吊起mixin app页面
  3. _____出现透明页面

Observed Results:

Expected Results:

  • 期望通过不同的scheme能吊起相应的功能页面

Relevant Code:

database disk image is malformed

android.database.sqlite.SQLiteDatabaseCorruptException: database disk image is malformed (Sqlite code 11 SQLITE_CORRUPT), (OS error - 11:Try again)

256人群群公告无法完整展示

Describe the bug
群公告很长超出显示框时,无法滚动显示.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a 256 group ,设置个比较长的群公告
  2. Click on 群公告
  3. Scroll down to 群公告
  4. See error ,只能看到一部分公告内容,无法上下滑动完整查看。

Expected behavior
可以上下滑动完整查看公告.

Screenshots
IMG_202020_178_900043504

Desktop (please complete the following information):

  • OS: Windows 10 专业版
  • Browser
  • Version

Smartphone (please complete the following information):

  • Device: DE106
  • OS: smartisan os
  • Browser
  • Version

Additional context
none.

API Credentials

where to put in the api credentials in the code?
is there no documentation for this app?

10002 error request data has an invalied field, when . i try to signup.

signal protocol ---- sessionId

在您的项目中,对于加密这一块, session_id 是做什么的,如何生成的,您在用户登录的时候,获取自己的session_id , 创建会话的时候,拿到对方的sesison_id , 加密的还是传入这个,和通过session_id 生成devices_id ,这个session_id是会改变的,望解答,🙏

Android 11 features support

  • Conversation notifications appear in a dedicated section at the top of the shade, with a people-forward design and conversation specific actions, such as opening the conversation as a bubble, creating a conversation shortcut on the home screen, or setting a reminder.
  • Bubbles - Bubbles help users keep conversations in view and accessible while multitasking on their devices. Messaging and chat apps should use the Bubbles API on notifications to enable this in Android 11.
  • Sharing shortcuts (from Android 10) - Apps that want to receive shared data should use the sharing shortcuts APIs to create share targets. Apps that want to send shared data should make sure to use the system share sheet.

https://android-developers.googleblog.com/2020/09/android11-final-release.html

Upgrade NDK to supported version

The NDK version used is "21.3.6528147"

ndkVersion "21.3.6528147"

is downloaded from page "Unsupported Downloads" (the "21e")
https://github.com/android/ndk/wiki/Unsupported-Downloads#r21e

Note: these obsolete versions of the NDK are no longer supported. Use a current release instead.

pages that show supported versions are which is "23.0.7599858"
https://developer.android.com/ndk/downloads/#older-downloads
https://github.com/android/ndk/wiki

Android POST 信息中打开 snapshot 白屏或停止响应

Describe the bug
在 POST 类型的信息中,以链接形式加入一个 snapshot 的 schema,比如 [Link](mixin://snapshots?trace={{trace_id}})。点击这个链接,之后点其他地方就没有响应了。间或,系统还会提示 Mixin 停止响应。然后白屏一下,snapshot 依然没有打开。

To Reproduce
Steps to reproduce the behavior:

  1. 给自己发一个 POST 信息,里面加一个 mixin://snapshots?trace={{trace_id}} 形式的链接。
  2. 点击那个链接,然后就什么都没反应了。(我确定这个 trace id 是有权限访问的,因为在 POST 消息外打开这个 schema 就是可以的)

Expected behavior
希望能在 POST 中直接打开这个 snapshot。iOS 版上就可以。

Smartphone (please complete the following information):

  • Device: 华为 Mate30
  • OS: Android
  • Version: 0.24.6

ShareHelper非单例

ShareHelper companion object 的get方法拿到的ShareHelper非单例
不太清楚你们是否接受非开发团队成员的pr
所以提一个issue.

问题明细:
one.mixin.android.util包下的ShareHelper.kt文件

    private var INSTANCE: ShareHelper? = null
    fun get(): ShareHelper =
        INSTANCE ?: synchronized(this) {
            INSTANCE ?: ShareHelper()
        }

get()方法没有对INSTANCE赋值,每次都会创建一个新的ShareHelper出来,建议改为:

    private var INSTANCE: ShareHelper? = null
    fun get(): ShareHelper =
        INSTANCE ?: synchronized(this) {
            INSTANCE ?: ShareHelper().also { INSTANCE = it }
        }

Missing x86_64 folder in ./app/src/main/cpp/*/lib with lib*.a files & Instructions to reproduce binaries in lib folders

building the app from tag v0.32.6 fail with error:

ninja: error: '/home/appuser/app/mixin/android-app/app/src/main/cpp/opus/lib/x86_64/libopusenc.a', needed by '/home/appuser/app/mixin/android-app/app/build/intermediates/cxx/RelWithDebInfo/5h42116x/obj/x86_64/libmixin.so', missing and no known rule

this happen even on alpine when installing libopusenc-dev

Containerfile debian based to reproduce:

FROM docker.io/debian:sid-slim

RUN set -ex; \
    mkdir -p /usr/share/man/man1/; \
    apt-get update; \
    DEBIAN_FRONTEND=noninteractive apt-get install --yes -o APT::Install-Suggests=false --no-install-recommends \
         openjdk-11-jdk git; \
    rm -rf /var/lib/apt/lists/*; \
    useradd -ms /bin/bash appuser;

USER appuser

ENV ANDROID_SDK_ROOT="/home/appuser/app/sdk" \
    ANDROID_HOME="/home/appuser/app/sdk"

RUN set -ex; \
    mkdir -p "/home/appuser/app/sdk/licenses" "/home/appuser/app/mixin/"; \
    printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/home/appuser/app/sdk/licenses/android-sdk-license"; \
    cd /home/appuser/app/mixin/; \
    git clone https://github.com/MixinNetwork/android-app; \
    cd android-app; \
    git checkout v0.32.6;
    
WORKDIR /home/appuser/app/mixin/android-app/

RUN set -ex; \
    sed -i 's/PASTE_YOUR_SECRET_TOKEN_HERE/sk.eyJ1Ijoicm9vdHJvb3QxIiwiYSI6ImNrdXZvN3hnODBmeGoydXFmdm1wamZzYWkifQ.2tvLMLnZ2cAI4_yKlYEPCQ/g' ./gradle.properties; \
    echo "{ \
  \"project_info\": { \
    \"project_number\": \"623252783566\", \
    \"firebase_url\": \"https://blockchaintest-ecd1c.firebaseio.com\", \
    \"project_id\": \"blockchaintest-ecd1c\", \
    \"storage_bucket\": \"blockchaintest-ecd1c.appspot.com\" \
  }, \
  \"client\": [ \
    { \
      \"client_info\": { \
        \"mobilesdk_app_id\": \"1:623252783566:android:02baff6e6c46ed96232b9f\", \
        \"android_client_info\": { \
          \"package_name\": \"one.mixin.messenger\" \
        } \
      }, \
      \"oauth_client\": [ \
        { \
          \"client_id\": \"623252783566-o6j47jlpan97fnibnr0vosvc4lh71sm1.apps.googleusercontent.com\", \
          \"client_type\": 3 \
        } \
      ], \
      \"api_key\": [ \
        { \
          \"current_key\": \"INSERT KEY HERE\" \
        } \
      ], \
      \"services\": { \
        \"appinvite_service\": { \
          \"other_platform_oauth_client\": [ \
            { \
              \"client_id\": \"623252783566-o6j47jlpan97fnibnr0vosvc4lh71sm1.apps.googleusercontent.com\", \
              \"client_type\": 3 \
            } \
          ] \
        } \
      } \
    } \
  ], \
  \"configuration_version\": \"1\" \
}" > /home/appuser/app/mixin/android-app/app/google-services.json;

Run ./gradlew assembleRelease in it.

full error log:

C/C++: ninja: error: '/home/appuser/app/mixin/android-app/app/src/main/cpp/opus/lib/x86_64/libopusenc.a', needed by '/home/appuser/app/mixin/android-app/app/build/intermediates/cxx/RelWithDebInfo/5h42116x/obj/x86_64/libmixin.so', missing and no known rule to make it

> Task :app:buildCMakeRelWithDebInfo FAILED
> Task :app:processReleaseManifestForPackage

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:buildCMakeRelWithDebInfo'.
> Build command failed.
  Error while executing process /home/appuser/app/sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /home/appuser/app/mixin/android-app/app/.cxx/RelWithDebInfo/5h42116x/x86_64 mixin rlottie}
  ninja: Entering directory `/home/appuser/app/mixin/android-app/app/.cxx/RelWithDebInfo/5h42116x/x86_64'
  
  ninja: error: '/home/appuser/app/mixin/android-app/app/src/main/cpp/opus/lib/x86_64/libopusenc.a', needed by '/home/appuser/app/mixin/android-app/app/build/intermediates/cxx/RelWithDebInfo/5h42116x/obj/x86_64/libmixin.so', missing and no known rule to make it

如何分享到Mixin

我们的产品非常喜欢Mixin,他对我们提出了分享到Mixin的一个需求
请问Mixin现在是否支持?

Video upload error

  1. Some videos convert error
  2. Attachment add upload and download speed
  3. If send video failed, should report the error and show to the user

Remove JCenter lines from build.gradle or at least specify what used by it directly

jcenter()

jcenter()

Jcenter service is closed (currently in read-only mode, no updates for packages will be made)
more details on needed migration:
https://developer.android.com/studio/build/jcenter-migration
https://blog.gradle.org/jcenter-shutdown

and here content on how to migrate:
https://jeroenmols.com/blog/2021/02/04/migratingjcenter/

You can declare specific usages of jcenter like explained in https://jeroenmols.com/blog/2021/02/04/migratingjcenter/#consumed-dependencies-from-bintrayjcenter and like it's done for example in this PR of unstoppable wallet "Gradually migrate from jcenter to mavenCentral"
https://github.com/horizontalsystems/unstoppable-wallet-android/pull/3752/files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.