Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Remove sms from android store #1889 #1890

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sultanahamer
Copy link

@sultanahamer sultanahamer commented Aug 21, 2022

Addresses #1889

Used this app for a day and realized the following

  1. Every new message is a new thread as the old thread/conversation is removed in Android store -> fixed it by checking if QKSMS has a message from this address and used that thread_id
  2. In case we select some other app as default messaging app and return to our app, it sync with Android message store and becomes empty -> commented the sync part for now. We can actually sync if user has not chosen this option else we can avoid sync

Will update this as I face more things

Code snippet for problem 1

           threadId = Realm.getDefaultInstance()
                .where(Message::class.java)
                .contains("address", address)
                .contains("type", "sms")
                .findFirst()
                ?.threadId ?: TelephonyCompat.getOrCreateThreadId(context, address);

applicationIdSuffix '.debug'
debuggable true
minifyEnabled false
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code adds a test version of same app with name DQKSMS so that I can test on phone along with prod still installed.

We can get rid of this if you feel its not required after testing

@@ -39,7 +39,7 @@

<application
android:name=".common.QKApplication"
android:allowBackup="true"
android:allowBackup="false"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one syncs the database/preferences to Google cloud which won't make sense in most of the app instances. We can remove this if you think otherwise.

<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="DQKSMS"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is needed to give the name DQKSMS for debug app.

This is more like extends default manifest and has only overrides like app name.

Also removed sync from happening automatically when default messaging
app changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant