Merge branch 'master' into feat/export-sms

# Conflicts:
#	app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt
#	app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt
#	app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt
This commit is contained in:
darthpaul 2021-09-18 22:16:12 +01:00
commit a5109da19f
44 changed files with 565 additions and 54 deletions

View File

@ -1,6 +1,14 @@
Changelog
==========
Version 5.10.1 *(2021-09-16)*
----------------------------
* Automatically resize sent MMS image attachments by default, allow customizing the limit
* Added Draft support
* Allow marking conversations un/read from the main screen
* Some other stability, UX and translation improvements
Version 5.10.0 *(2021-08-27)*
----------------------------

View File

@ -16,8 +16,8 @@ android {
applicationId "com.simplemobiletools.smsmessenger"
minSdkVersion 22
targetSdkVersion 30
versionCode 35
versionName "5.10.0"
versionCode 36
versionName "5.10.1"
setProperty("archivesBaseName", "sms-messenger")
}
@ -56,7 +56,7 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:8979ca8187'
implementation 'com.github.SimpleMobileTools:Simple-Commons:f49f7b5f89'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'com.klinkerapps:android-smsmms:5.2.6'
implementation 'com.github.tibbi:IndicatorFastScroll:c3de1d040a'

View File

@ -195,6 +195,16 @@
</intent-filter>
</receiver>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<activity-alias
android:name=".activities.SplashActivity.Red"
android:enabled="false"

View File

@ -102,7 +102,7 @@ class NewConversationActivity : SimpleActivity() {
private fun isThirdPartyIntent(): Boolean {
if ((intent.action == Intent.ACTION_SENDTO || intent.action == Intent.ACTION_SEND || intent.action == Intent.ACTION_VIEW) && intent.dataString != null) {
val number = intent.dataString!!.removePrefix("sms:").removePrefix("smsto:").removePrefix("mms").removePrefix("mmsto:").trim()
val number = intent.dataString!!.removePrefix("sms:").removePrefix("smsto:").removePrefix("mms").removePrefix("mmsto:").replace("+", "%2b").trim()
launchThreadActivity(URLDecoder.decode(number), "")
finish()
return true

View File

@ -14,12 +14,10 @@ import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.smsmessenger.R
import com.simplemobiletools.smsmessenger.extensions.config
import com.simplemobiletools.smsmessenger.extensions.getLockScreenVisibilityText
import com.simplemobiletools.smsmessenger.helpers.LOCK_SCREEN_NOTHING
import com.simplemobiletools.smsmessenger.helpers.LOCK_SCREEN_SENDER
import com.simplemobiletools.smsmessenger.helpers.LOCK_SCREEN_SENDER_MESSAGE
import com.simplemobiletools.smsmessenger.helpers.refreshMessages
import kotlinx.android.synthetic.main.activity_settings.*
import com.simplemobiletools.smsmessenger.extensions.getMMSFileLimitText
import com.simplemobiletools.smsmessenger.helpers.*
import java.util.*
import kotlinx.android.synthetic.main.activity_settings.*
class SettingsActivity : SimpleActivity() {
private var blockedNumbersAtPause = -1
@ -40,8 +38,10 @@ class SettingsActivity : SimpleActivity() {
setupChangeDateTimeFormat()
setupFontSize()
setupShowCharacterCounter()
setupUseSimpleCharacters()
setupEnableDeliveryReports()
setupLockScreenVisibility()
setupMMSFileSizeLimit()
updateTextColors(settings_scrollview)
if (blockedNumbersAtPause != -1 && blockedNumbersAtPause != getBlockedNumbers().hashCode()) {
@ -131,6 +131,13 @@ class SettingsActivity : SimpleActivity() {
config.showCharacterCounter = settings_show_character_counter.isChecked
}
}
private fun setupUseSimpleCharacters() {
settings_use_simple_characters.isChecked = config.useSimpleCharacters
settings_use_simple_characters_holder.setOnClickListener {
settings_use_simple_characters.toggle()
config.useSimpleCharacters = settings_use_simple_characters.isChecked
}
}
private fun setupEnableDeliveryReports() {
settings_enable_delivery_reports.isChecked = config.enableDeliveryReports
@ -155,4 +162,25 @@ class SettingsActivity : SimpleActivity() {
}
}
}
private fun setupMMSFileSizeLimit() {
settings_mms_file_size_limit.text = getMMSFileLimitText(config.mmsFileSizeLimit)
settings_mms_file_size_limit_holder.setOnClickListener {
val items = arrayListOf(
RadioItem(1, getString(R.string.mms_file_size_limit_100kb), FILE_SIZE_100_KB),
RadioItem(2, getString(R.string.mms_file_size_limit_200kb), FILE_SIZE_200_KB),
RadioItem(3, getString(R.string.mms_file_size_limit_300kb), FILE_SIZE_300_KB),
RadioItem(4, getString(R.string.mms_file_size_limit_600kb), FILE_SIZE_600_KB),
RadioItem(5, getString(R.string.mms_file_size_limit_1mb), FILE_SIZE_1_MB),
RadioItem(6, getString(R.string.mms_file_size_limit_2mb), FILE_SIZE_2_MB),
RadioItem(7, getString(R.string.mms_file_size_limit_none), FILE_SIZE_NONE),
)
val checkedItemId = items.find { it.value == config.mmsFileSizeLimit }?.id ?: 7
RadioGroupDialog(this@SettingsActivity, items, checkedItemId) {
config.mmsFileSizeLimit = it as Long
settings_mms_file_size_limit.text = getMMSFileLimitText(config.mmsFileSizeLimit)
}
}
}
}

View File

@ -29,6 +29,8 @@ import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import com.bumptech.glide.request.RequestListener
import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.request.target.Target
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.klinker.android.send_message.Settings
import com.klinker.android.send_message.Transaction
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
@ -65,7 +67,8 @@ class ThreadActivity : SimpleActivity() {
private var privateContacts = ArrayList<SimpleContact>()
private var messages = ArrayList<Message>()
private val availableSIMCards = ArrayList<SIMCard>()
private var attachmentUris = LinkedHashSet<Uri>()
private var attachmentSelections = mutableMapOf<String, AttachmentSelection>()
private val imageCompressor by lazy { ImageCompressor(this) }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -119,7 +122,7 @@ class ThreadActivity : SimpleActivity() {
override fun onPause() {
super.onPause()
if (thread_type_message.value != "" && attachmentUris.isEmpty()) {
if (thread_type_message.value != "" && attachmentSelections.isEmpty()) {
saveSmsDraft(thread_type_message.value, threadId)
} else {
deleteSmsDraft(threadId)
@ -390,7 +393,10 @@ class ThreadActivity : SimpleActivity() {
private fun setupParticipants() {
if (participants.isEmpty()) {
participants = if (messages.isEmpty()) {
getThreadParticipants(threadId, null)
val intentNumbers = getPhoneNumbersFromIntent()
val participants = getThreadParticipants(threadId, null)
fixParticipantNumbers(participants, intentNumbers)
} else {
messages.first().participants
}
@ -583,7 +589,7 @@ class ThreadActivity : SimpleActivity() {
conversationsDB.markRead(threadId)
}
if (i == cnt - 1 && (message.type == Telephony.Sms.MESSAGE_TYPE_SENT )) {
if (i == cnt - 1 && (message.type == Telephony.Sms.MESSAGE_TYPE_SENT)) {
items.add(ThreadSent(message.id, delivered = message.status == Telephony.Sms.STATUS_COMPLETE))
}
}
@ -606,29 +612,57 @@ class ThreadActivity : SimpleActivity() {
}
private fun addAttachment(uri: Uri) {
if (attachmentUris.contains(uri)) {
val originalUriString = uri.toString()
if (attachmentSelections.containsKey(originalUriString)) {
return
}
attachmentUris.add(uri)
attachmentSelections[originalUriString] = AttachmentSelection(uri, false)
val attachmentView = addAttachmentView(originalUriString, uri)
val mimeType = contentResolver.getType(uri) ?: return
if (mimeType.isImageMimeType() && config.mmsFileSizeLimit != FILE_SIZE_NONE) {
val selection = attachmentSelections[originalUriString]
attachmentSelections[originalUriString] = selection!!.copy(isPending = true)
checkSendMessageAvailability()
attachmentView.thread_attachment_progress.beVisible()
imageCompressor.compressImage(uri, config.mmsFileSizeLimit) { compressedUri ->
runOnUiThread {
if (compressedUri != null) {
attachmentSelections[originalUriString] = AttachmentSelection(compressedUri, false)
loadAttachmentPreview(attachmentView, compressedUri)
}
checkSendMessageAvailability()
attachmentView.thread_attachment_progress.beGone()
}
}
}
}
private fun addAttachmentView(originalUri: String, uri: Uri): View {
thread_attachments_holder.beVisible()
val attachmentView = layoutInflater.inflate(R.layout.item_attachment, null).apply {
thread_attachments_wrapper.addView(this)
thread_remove_attachment.setOnClickListener {
thread_attachments_wrapper.removeView(this)
attachmentUris.remove(uri)
if (attachmentUris.isEmpty()) {
attachmentSelections.remove(originalUri)
if (attachmentSelections.isEmpty()) {
thread_attachments_holder.beGone()
}
}
}
loadAttachmentPreview(attachmentView, uri)
return attachmentView
}
private fun loadAttachmentPreview(attachmentView: View, uri: Uri) {
val roundedCornersRadius = resources.getDimension(R.dimen.medium_margin).toInt()
val options = RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.NONE)
.transform(CenterCrop(), RoundedCorners(roundedCornersRadius))
Glide.with(this)
Glide.with(attachmentView.thread_attachment_preview)
.load(uri)
.transition(DrawableTransitionOptions.withCrossFade())
.apply(options)
@ -650,7 +684,7 @@ class ThreadActivity : SimpleActivity() {
}
private fun checkSendMessageAvailability() {
if (thread_type_message.text.isNotEmpty() || attachmentUris.isNotEmpty()) {
if (thread_type_message.text.isNotEmpty() || (attachmentSelections.isNotEmpty() && !attachmentSelections.values.any { it.isPending })) {
thread_send_message.isClickable = true
thread_send_message.alpha = 0.9f
} else {
@ -660,11 +694,13 @@ class ThreadActivity : SimpleActivity() {
}
private fun sendMessage() {
val msg = thread_type_message.value
if (msg.isEmpty() && attachmentUris.isEmpty()) {
var msg = thread_type_message.value
if (msg.isEmpty() && attachmentSelections.isEmpty()) {
return
}
msg = removeDiacriticsIfNeeded(msg)
val numbers = ArrayList<String>()
participants.forEach {
it.phoneNumbers.forEach {
@ -687,11 +723,11 @@ class ThreadActivity : SimpleActivity() {
val transaction = Transaction(this, settings)
val message = com.klinker.android.send_message.Message(msg, numbers.toTypedArray())
if (attachmentUris.isNotEmpty()) {
for (uri in attachmentUris) {
if (attachmentSelections.isNotEmpty()) {
for (selection in attachmentSelections.values) {
try {
val byteArray = contentResolver.openInputStream(uri)?.readBytes() ?: continue
val mimeType = contentResolver.getType(uri) ?: continue
val byteArray = contentResolver.openInputStream(selection.uri)?.readBytes() ?: continue
val mimeType = contentResolver.getType(selection.uri) ?: continue
message.addMedia(byteArray, mimeType)
} catch (e: Exception) {
showErrorToast(e)
@ -711,7 +747,7 @@ class ThreadActivity : SimpleActivity() {
refreshedSinceSent = false
transaction.sendNewMessage(message, threadId)
thread_type_message.setText("")
attachmentUris.clear()
attachmentSelections.clear()
thread_attachments_holder.beGone()
thread_attachments_wrapper.removeAllViews()
@ -781,6 +817,41 @@ class ThreadActivity : SimpleActivity() {
showSelectedContacts()
}
private fun getPhoneNumbersFromIntent(): ArrayList<String> {
val numberFromIntent = intent.getStringExtra(THREAD_NUMBER)
val numbers = ArrayList<String>()
if (numberFromIntent != null) {
if (numberFromIntent.startsWith('[') && numberFromIntent.endsWith(']')) {
val type = object : TypeToken<List<String>>() {}.type
numbers.addAll(Gson().fromJson(numberFromIntent, type))
} else {
numbers.add(numberFromIntent)
}
}
return numbers
}
private fun fixParticipantNumbers(participants: ArrayList<SimpleContact>, properNumbers: ArrayList<String>): ArrayList<SimpleContact> {
for (number in properNumbers) {
for (participant in participants) {
participant.phoneNumbers = participant.phoneNumbers.map {
val numberWithoutPlus = number.replace("+", "")
if (numberWithoutPlus == it.trim()) {
if (participant.name == it) {
participant.name = number
}
number
} else {
it
}
} as ArrayList<String>
}
}
return participants
}
@SuppressLint("MissingPermission")
@Subscribe(threadMode = ThreadMode.ASYNC)
fun refreshMessages(event: Events.RefreshMessages) {

View File

@ -217,6 +217,11 @@ class ConversationsAdapter(
conversationsMarkedAsUnread.filter { conversation -> conversation.read }.forEach {
activity.markThreadMessagesUnread(it.threadId)
}
activity.runOnUiThread {
refreshMessages()
finishActMode()
}
}
}

View File

@ -0,0 +1,9 @@
package com.simplemobiletools.smsmessenger.extensions
import android.graphics.Bitmap
fun Bitmap.CompressFormat.extension() = when (this) {
Bitmap.CompressFormat.PNG -> "png"
Bitmap.CompressFormat.WEBP -> "webp"
else -> "jpg"
}

View File

@ -5,6 +5,7 @@ import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.content.ContentResolver
import android.content.ContentValues
import android.content.Context
import android.content.Intent
@ -17,6 +18,7 @@ import android.net.Uri
import android.os.Handler
import android.os.Looper
import android.provider.ContactsContract.PhoneLookup
import android.provider.OpenableColumns
import android.provider.Telephony.*
import android.text.TextUtils
import androidx.core.app.NotificationCompat
@ -35,8 +37,10 @@ import com.simplemobiletools.smsmessenger.interfaces.MessagesDao
import com.simplemobiletools.smsmessenger.models.*
import com.simplemobiletools.smsmessenger.receivers.DirectReplyReceiver
import com.simplemobiletools.smsmessenger.receivers.MarkAsReadReceiver
import java.io.FileNotFoundException
import java.util.*
import kotlin.collections.ArrayList
import java.text.Normalizer
import me.leolin.shortcutbadger.ShortcutBadger
val Context.config: Config get() = Config.newInstance(applicationContext)
@ -73,11 +77,7 @@ fun Context.getMessages(threadId: Long): ArrayList<Message> {
val blockedNumbers = getBlockedNumbers()
var messages = ArrayList<Message>()
queryCursor(uri, projection, selection, selectionArgs, sortOrder, showErrors = true) { cursor ->
val senderNumber = cursor.getStringValue(Sms.ADDRESS)
if(senderNumber == null){
return@queryCursor
}
val senderNumber = cursor.getStringValue(Sms.ADDRESS) ?: return@queryCursor
val isNumberBlocked = if (blockStatus.containsKey(senderNumber)) {
blockStatus[senderNumber]!!
@ -783,6 +783,10 @@ fun Context.getLockScreenVisibilityText(type: Int) = getString(
}
)
fun Context.removeDiacriticsIfNeeded(text: String): String {
return if (config.useSimpleCharacters) text.normalizeString() else text
}
fun Context.getSmsDraft(threadId: Long): String? {
val uri = Sms.Draft.CONTENT_URI
val projection = arrayOf(Sms.BODY)
@ -835,6 +839,18 @@ fun Context.deleteSmsDraft(threadId: Long) {
}
}
fun Context.getMMSFileLimitText(size: Long) = getString(
when (size) {
FILE_SIZE_100_KB -> R.string.mms_file_size_limit_100kb
FILE_SIZE_200_KB -> R.string.mms_file_size_limit_200kb
FILE_SIZE_300_KB -> R.string.mms_file_size_limit_300kb
FILE_SIZE_600_KB -> R.string.mms_file_size_limit_600kb
FILE_SIZE_1_MB -> R.string.mms_file_size_limit_1mb
FILE_SIZE_2_MB -> R.string.mms_file_size_limit_2mb
else -> R.string.mms_file_size_limit_none
}
)
fun Context.updateLastConversationMessage(threadId: Long) {
val uri = Threads.CONTENT_URI
val selection = "${Threads._ID} = ?"
@ -846,3 +862,38 @@ fun Context.updateLastConversationMessage(threadId: Long) {
} catch (e: Exception) {
}
}
fun Context.getFileSizeFromUri(uri: Uri): Long {
val assetFileDescriptor = try {
contentResolver.openAssetFileDescriptor(uri, "r")
} catch (e: FileNotFoundException) {
null
}
// uses ParcelFileDescriptor#getStatSize underneath if failed
val length = assetFileDescriptor?.use { it.length } ?: FILE_SIZE_NONE
if (length != -1L) {
return length
}
// if "content://" uri scheme, try contentResolver table
if (uri.scheme.equals(ContentResolver.SCHEME_CONTENT)) {
return contentResolver.query(uri, arrayOf(OpenableColumns.SIZE), null, null, null)
?.use { cursor ->
// maybe shouldn't trust ContentResolver for size:
// https://stackoverflow.com/questions/48302972/content-resolver-returns-wrong-size
val sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE)
if (sizeIndex == -1) {
return@use FILE_SIZE_NONE
}
cursor.moveToFirst()
return try {
cursor.getLong(sizeIndex)
} catch (_: Throwable) {
FILE_SIZE_NONE
}
} ?: FILE_SIZE_NONE
} else {
return FILE_SIZE_NONE
}
}

View File

@ -0,0 +1,16 @@
package com.simplemobiletools.smsmessenger.extensions
fun String.getExtensionFromMimeType(): String {
return when (lowercase()) {
"image/png" -> ".png"
"image/apng" -> ".apng"
"image/webp" -> ".webp"
"image/svg+xml" -> ".svg"
"image/gif" -> ".gif"
else -> ".jpg"
}
}
fun String.isImageMimeType(): Boolean {
return lowercase().startsWith("image")
}

View File

@ -18,6 +18,10 @@ class Config(context: Context) : BaseConfig(context) {
get() = prefs.getBoolean(SHOW_CHARACTER_COUNTER, false)
set(showCharacterCounter) = prefs.edit().putBoolean(SHOW_CHARACTER_COUNTER, showCharacterCounter).apply()
var useSimpleCharacters: Boolean
get() = prefs.getBoolean(USE_SIMPLE_CHARACTERS, false)
set(useSimpleCharacters) = prefs.edit().putBoolean(USE_SIMPLE_CHARACTERS, useSimpleCharacters).apply()
var enableDeliveryReports: Boolean
get() = prefs.getBoolean(ENABLE_DELIVERY_REPORTS, true)
set(enableDeliveryReports) = prefs.edit().putBoolean(ENABLE_DELIVERY_REPORTS, enableDeliveryReports).apply()
@ -26,6 +30,10 @@ class Config(context: Context) : BaseConfig(context) {
get() = prefs.getInt(LOCK_SCREEN_VISIBILITY, LOCK_SCREEN_SENDER_MESSAGE)
set(lockScreenVisibilitySetting) = prefs.edit().putInt(LOCK_SCREEN_VISIBILITY, lockScreenVisibilitySetting).apply()
var mmsFileSizeLimit: Long
get() = prefs.getLong(MMS_FILE_SIZE_LIMIT, FILE_SIZE_1_MB)
set(mmsFileSizeLimit) = prefs.edit().putLong(MMS_FILE_SIZE_LIMIT, mmsFileSizeLimit).apply()
var lastExportPath: String
get() = prefs.getString(LAST_EXPORT_PATH, "")!!
set(lastExportPath) = prefs.edit().putString(LAST_EXPORT_PATH, lastExportPath).apply()

View File

@ -13,8 +13,10 @@ const val SEARCHED_MESSAGE_ID = "searched_message_id"
const val USE_SIM_ID_PREFIX = "use_sim_id_"
const val NOTIFICATION_CHANNEL = "simple_sms_messenger"
const val SHOW_CHARACTER_COUNTER = "show_character_counter"
const val USE_SIMPLE_CHARACTERS = "use_simple_characters"
const val LOCK_SCREEN_VISIBILITY = "lock_screen_visibility"
const val ENABLE_DELIVERY_REPORTS = "enable_delivery_reports"
const val MMS_FILE_SIZE_LIMIT = "mms_file_size_limit"
const val LAST_EXPORT_PATH = "last_export_path"
const val EXPORT_SMS = "export_sms"
const val EXPORT_MMS = "export_mms"
@ -40,6 +42,14 @@ const val LOCK_SCREEN_SENDER_MESSAGE = 1
const val LOCK_SCREEN_SENDER = 2
const val LOCK_SCREEN_NOTHING = 3
const val FILE_SIZE_NONE = -1L
const val FILE_SIZE_100_KB = 102_400L
const val FILE_SIZE_200_KB = 204_800L
const val FILE_SIZE_300_KB = 307_200L
const val FILE_SIZE_600_KB = 614_400L
const val FILE_SIZE_1_MB = 1_048_576L
const val FILE_SIZE_2_MB = 2_097_152L
fun refreshMessages() {
EventBus.getDefault().post(Events.RefreshMessages())
}

View File

@ -0,0 +1,119 @@
package com.simplemobiletools.smsmessenger.helpers
import android.content.Context
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Matrix
import android.media.ExifInterface
import android.net.Uri
import com.simplemobiletools.commons.extensions.getCompressionFormat
import com.simplemobiletools.commons.extensions.getMyFileUri
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.smsmessenger.extensions.extension
import com.simplemobiletools.smsmessenger.extensions.getExtensionFromMimeType
import com.simplemobiletools.smsmessenger.extensions.getFileSizeFromUri
import com.simplemobiletools.smsmessenger.extensions.isImageMimeType
import java.io.File
import java.io.FileOutputStream
/**
* Compress image to a given size based on
* [Compressor](https://github.com/zetbaitsu/Compressor/)
* */
class ImageCompressor(private val context: Context) {
private val contentResolver = context.contentResolver
private val outputDirectory = File(context.cacheDir, "compressed").apply {
if (!exists()) {
mkdirs()
}
}
fun compressImage(uri: Uri, compressSize: Long, callback: (compressedFileUri: Uri?) -> Unit) {
ensureBackgroundThread {
try {
val fileSize = context.getFileSizeFromUri(uri)
if (fileSize > compressSize) {
val mimeType = contentResolver.getType(uri)!!
if (mimeType.isImageMimeType()) {
val byteArray = contentResolver.openInputStream(uri)?.readBytes()!!
var destinationFile = File(outputDirectory, System.currentTimeMillis().toString().plus(mimeType.getExtensionFromMimeType()))
destinationFile.writeBytes(byteArray)
val constraint = SizeConstraint(compressSize)
while (constraint.isSatisfied(destinationFile).not()) {
destinationFile = constraint.satisfy(destinationFile)
}
callback.invoke(context.getMyFileUri(destinationFile))
} else {
callback.invoke(null)
}
} else {
//no need to compress since the file is less than the compress size
callback.invoke(uri)
}
} catch (e: Exception) {
callback.invoke(null)
}
}
}
private fun overWrite(imageFile: File, bitmap: Bitmap, format: Bitmap.CompressFormat = imageFile.path.getCompressionFormat(), quality: Int = 100): File {
val result = if (format == imageFile.path.getCompressionFormat()) {
imageFile
} else {
File("${imageFile.absolutePath.substringBeforeLast(".")}.${format.extension()}")
}
imageFile.delete()
saveBitmap(bitmap, result, format, quality)
return result
}
private fun saveBitmap(bitmap: Bitmap, destination: File, format: Bitmap.CompressFormat = destination.path.getCompressionFormat(), quality: Int = 100) {
destination.parentFile?.mkdirs()
var fileOutputStream: FileOutputStream? = null
try {
fileOutputStream = FileOutputStream(destination.absolutePath)
bitmap.compress(format, quality, fileOutputStream)
} finally {
fileOutputStream?.run {
flush()
close()
}
}
}
private fun loadBitmap(imageFile: File) = BitmapFactory.decodeFile(imageFile.absolutePath).run {
determineImageRotation(imageFile, this)
}
private fun determineImageRotation(imageFile: File, bitmap: Bitmap): Bitmap {
val exif = ExifInterface(imageFile.absolutePath)
val orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0)
val matrix = Matrix()
when (orientation) {
6 -> matrix.postRotate(90f)
3 -> matrix.postRotate(180f)
8 -> matrix.postRotate(270f)
}
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.width, bitmap.height, matrix, true)
}
private inner class SizeConstraint(
private val maxFileSize: Long,
private val stepSize: Int = 10,
private val maxIteration: Int = 10,
private val minQuality: Int = 10
) {
private var iteration: Int = 0
fun isSatisfied(imageFile: File): Boolean {
return imageFile.length() <= maxFileSize || iteration >= maxIteration
}
fun satisfy(imageFile: File): File {
iteration++
val quality = (100 - iteration * stepSize).takeIf { it >= minQuality } ?: minQuality
return overWrite(imageFile, loadBitmap(imageFile), quality = quality)
}
}
}

View File

@ -0,0 +1,8 @@
package com.simplemobiletools.smsmessenger.models
import android.net.Uri
data class AttachmentSelection(
val uri: Uri,
val isPending: Boolean,
)

View File

@ -11,6 +11,7 @@ import com.simplemobiletools.commons.extensions.showErrorToast
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.smsmessenger.extensions.conversationsDB
import com.simplemobiletools.smsmessenger.extensions.markThreadMessagesRead
import com.simplemobiletools.smsmessenger.extensions.removeDiacriticsIfNeeded
import com.simplemobiletools.smsmessenger.helpers.REPLY
import com.simplemobiletools.smsmessenger.helpers.THREAD_ID
import com.simplemobiletools.smsmessenger.helpers.THREAD_NUMBER
@ -19,7 +20,9 @@ class DirectReplyReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val address = intent.getStringExtra(THREAD_NUMBER)
val threadId = intent.getLongExtra(THREAD_ID, 0L)
val msg = RemoteInput.getResultsFromIntent(intent).getCharSequence(REPLY)?.toString() ?: return
var msg = RemoteInput.getResultsFromIntent(intent).getCharSequence(REPLY)?.toString() ?: return
msg = context.removeDiacriticsIfNeeded(msg)
val settings = Settings()
settings.useSystemSending = true

View File

@ -10,6 +10,7 @@ import com.simplemobiletools.smsmessenger.extensions.markThreadMessagesRead
import com.simplemobiletools.smsmessenger.extensions.updateUnreadCountBadge
import com.simplemobiletools.smsmessenger.helpers.MARK_AS_READ
import com.simplemobiletools.smsmessenger.helpers.THREAD_ID
import com.simplemobiletools.smsmessenger.helpers.refreshMessages
class MarkAsReadReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
@ -21,6 +22,7 @@ class MarkAsReadReceiver : BroadcastReceiver() {
context.markThreadMessagesRead(threadId)
context.conversationsDB.markRead(threadId)
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
refreshMessages()
}
}
}

View File

@ -195,6 +195,29 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_use_simple_characters_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_use_simple_characters"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/use_simple_characters"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_enable_delivery_reports_holder"
android:layout_width="match_parent"
@ -250,5 +273,38 @@
tools:text="@string/sender_and_message" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_mms_file_size_limit_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_mms_file_size_limit_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toStartOf="@+id/settings_mms_file_size_limit"
android:paddingStart="@dimen/medium_margin"
android:paddingEnd="@dimen/medium_margin"
android:text="@string/mms_file_size_limit" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_mms_file_size_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/medium_margin"
android:background="@null"
android:clickable="false"
tools:text="@string/mms_file_size_limit_none" />
</RelativeLayout>
</LinearLayout>
</ScrollView>

View File

@ -1,14 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/conversation_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_width="@dimen/attachment_preview_size"
android:layout_height="@dimen/attachment_preview_size">
<ImageView
android:id="@+id/thread_attachment_preview"
android:layout_width="@dimen/attachment_preview_size"
android:layout_height="@dimen/attachment_preview_size"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible" />
<ProgressBar
android:id="@+id/thread_attachment_progress"
android:layout_width="@dimen/remove_attachment_size"
android:layout_height="@dimen/remove_attachment_size"
android:layout_centerInParent="true"
android:visibility="gone"
tools:visibility="visible" />
<ImageView
android:id="@+id/thread_remove_attachment"
@ -18,6 +28,7 @@
android:layout_alignEnd="@+id/thread_attachment_preview"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_cross_vector"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible" />
</RelativeLayout>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Proč aplikace vyžaduje přístup k internetu?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Hvorfor kræver appen adgang til internettet?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Warum benötigt diese App Internetzugriff?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Αποστολέας και μήνυμα</string>
<string name="sender_only">Αποστολέας μόνο</string>
<string name="enable_delivery_reports">Ενεργοποίηση αναφορών παράδοσης</string>
<string name="use_simple_characters">Αφαίρεση τονισμών και διακριτικών κατά την αποστολή μηνυμάτων</string>
<string name="mms_file_size_limit">Αλλαγή μεγέθους απεσταλμένων εικόνων MMS</string>
<string name="mms_file_size_limit_none">Χωρίς όριο</string>
<!-- FAQ -->
<string name="faq_1_title">Γιατί η εφαρμογή απαιτεί πρόσβαση στο Internet;</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">¿Por qué la aplicación requiere acceso a internet?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Miksi sovellus vaatii Internet-yhteyden?</string>

View File

@ -2,21 +2,21 @@
<string name="app_name">Simple SMS Messenger</string>
<string name="app_launcher_name">SMS Messenger</string>
<string name="type_a_message">Écrivez un message…</string>
<string name="message_not_sent_short">Message not sent</string>
<string name="message_not_sent_touch_retry">Not sent. Touch to retry.</string>
<string name="message_sending_error">Your message to \'%s\' has not been sent</string>
<string name="message_not_sent_short">Message non envoyé</string>
<string name="message_not_sent_touch_retry">Pas envoyé. Appuyez pour réessayer.</string>
<string name="message_sending_error">Votre message à \'%s\' n\'a pas été envoyé</string>
<string name="add_person">Ajouter une personne</string>
<string name="attachment">Pièce jointe</string>
<string name="no_conversations_found">Aucune conversation enregistrée n\'a été trouvée</string>
<string name="start_conversation">Commencer une conversation</string>
<string name="reply">Répondre</string>
<string name="show_character_counter">Show a character counter at writing messages</string>
<string name="loading_messages">Loading messages…</string>
<string name="no_reply_support">Sender doesn\'t support replies</string>
<string name="draft">Draft</string>
<string name="sending">Sending</string>
<string name="export_messages">Export messages</string>
<string name="import_messages">Import messages</string>
<string name="show_character_counter">Afficher le nombre de caractères lors de l\'écriture de messages</string>
<string name="loading_messages">Chargement des messages…</string>
<string name="no_reply_support">L\'expéditeur n\'accepte pas les réponses</string>
<string name="draft">Brouillon</string>
<string name="sending">Envoi en cours</string>
<string name="export_messages">Export de messages</string>
<string name="import_messages">Import de messages</string>
<!-- New conversation -->
<string name="new_conversation">Nouvelle conversation</string>
@ -45,15 +45,18 @@
</plurals>
<!-- Settings -->
<string name="lock_screen_visibility">Lock screen notification visibility</string>
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="lock_screen_visibility">Visibilité des notifications sur l\'écran de verrouillage</string>
<string name="sender_and_message">Expéditeur et message</string>
<string name="sender_only">Expéditeur uniquement</string>
<string name="enable_delivery_reports">Activer les rapports d\'envoi</string>
<string name="use_simple_characters">Supprimer les accents et caractères spéciaux lors de l\'envoi de messages</string>
<string name="mms_file_size_limit">Redimensionner les images MMS envoyées</string>
<string name="mms_file_size_limit_none">Pas de limite</string>
<!-- FAQ -->
<string name="faq_1_title">Pourquoi cette application a besoin d\'un accès à internet ?</string>
<string name="faq_1_text">Malheureusement, cela est nécessaire pour envoyer des pièces jointes dans les MMS. Ne pas pouvoir envoyer de MMS serait un énorme désavantage comparé à d\'autres applications, nous avons donc décidé de faire ainsi.
Cependant, comme toujours, il n\'y a aucune publicité, traqueur ou analyseur de quelque sorte, internet n\'est utilisé que pour envoyer des MMS.</string>
Cependant, comme toujours, il n\'y a aucune publicité, traqueur ou analyseur de quelque sorte, internet n\'est utilisé que pour envoyer des MMS.</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- App title has to have less than 50 characters. If you cannot squeeze it, just remove a part of it -->

View File

@ -2,12 +2,21 @@
<string name="app_name">Simple SMS Messenger</string>
<string name="app_launcher_name">Mensaxe SMS</string>
<string name="type_a_message">Escribir unha mensaxe…</string>
<string name="message_not_sent">Mensaxe non enviada</string>
<string name="message_not_sent_short">Mensaxe non enviada</string>
<string name="message_not_sent_touch_retry">Not sent. Touch to retry.</string>
<string name="message_sending_error">Your message to \'%s\' has not been sent</string>
<string name="add_person">Engadir persoa</string>
<string name="attachment">Anexo</string>
<string name="no_conversations_found">Non se atoparon conversas</string>
<string name="start_conversation">Iniciar unha conversa</string>
<string name="reply">Responder</string>
<string name="show_character_counter">Show a character counter at writing messages</string>
<string name="loading_messages">Loading messages…</string>
<string name="no_reply_support">Sender doesn\'t support replies</string>
<string name="draft">Draft</string>
<string name="sending">Sending…</string>
<string name="export_messages">Export messages</string>
<string name="import_messages">Import messages</string>
<!-- New conversation -->
<string name="new_conversation">Nova conversa</string>
@ -35,6 +44,15 @@
<item quantity="other">%d mensaxes</item>
</plurals>
<!-- Settings -->
<string name="lock_screen_visibility">Lock screen notification visibility</string>
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Por que o aplicativo necesita acceder a Internet?</string>
<string name="faq_1_text">Infelizmente é a única forma para poder enviar anexos MMS. A incapacidade de non conseguir enviar MMS sería unha enorme desvantaxe comparativamente a outros aplicativos e, por iso, tomamos esta decisión. Pero, como habitualmente, o aplicativo non ten anuncios, non rastrea os utilizadores nin recolle datos persoais. Este permiso só é necesario para enviar as MMS.</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Mengapa aplikasi membutuhkan akses ke internet?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Mittente e messaggio</string>
<string name="sender_only">Solo mittente</string>
<string name="enable_delivery_reports">Abilita conferma di consegna</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Perché l\'applicazione richiede l\'accesso ad internet?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">なぜアプリ使用にインターネットへのアクセスが必要なのですか?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Why does the app require access to the internet?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">അപ്ലിക്കേഷന് ഇന്റർനെറ്റിലേക്ക് ആവശ്യമായി വരുന്നത് എന്തുകൊണ്ട്?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Afzender en bericht</string>
<string name="sender_only">Alleen afzender</string>
<string name="enable_delivery_reports">Bezorgingsrapporten inschakelen</string>
<string name="use_simple_characters">Accenten en diakritische tekens verwijderen bij het verzenden van berichten</string>
<string name="mms_file_size_limit">Afbeelding verkleinen voor MMS</string>
<string name="mms_file_size_limit_none">Geen limiet</string>
<!-- FAQ -->
<string name="faq_1_title">Waarom heeft deze app toegang nodig tot het internet?</string>

View File

@ -51,6 +51,9 @@
<string name="sender_and_message">Nadawca i treść</string>
<string name="sender_only">Tylko nadawca</string>
<string name="enable_delivery_reports">Włącz raporty doręczeń</string>
<string name="use_simple_characters">Usuwaj akcenty i znaki diakrytyczne podczas wysyłania wiadomości</string>
<string name="mms_file_size_limit">Rozmiar wysyłanych obrazków w MMS-ach</string>
<string name="mms_file_size_limit_none">Bez limitu</string>
<!-- FAQ -->
<string name="faq_1_title">Dlaczego aplikacja wymaga dostępu do Internetu?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Porque é que a aplicação necessita de aceder à Internet?</string>

View File

@ -51,6 +51,9 @@
<string name="sender_and_message">Отправитель и сообщение</string>
<string name="sender_only">Только отправитель</string>
<string name="enable_delivery_reports">Использовать отчёты о доставке</string>
<string name="use_simple_characters">Удалять ударения и диакритические знаки при отправке сообщений</string>
<string name="mms_file_size_limit">Изменять размер отправляемых в MMS изображений</string>
<string name="mms_file_size_limit_none">Нет ограничения</string>
<!-- FAQ -->
<string name="faq_1_title">Почему приложение требует доступ к интернету?</string>

View File

@ -12,7 +12,7 @@
<string name="reply">Odpovedať</string>
<string name="show_character_counter">Zobraziť počítadlo znakov pri písaní správ</string>
<string name="loading_messages">Načítanie správ…</string>
<string name="no_reply_support">Sender doesn\'t support replies</string>
<string name="no_reply_support">Odosielateľ nepodporuje odpovede</string>
<string name="draft">Koncept</string>
<string name="sending">Odosiela sa…</string>
<string name="export_messages">Exportovať správy</string>
@ -51,6 +51,9 @@
<string name="sender_and_message">Odosielateľ a správa</string>
<string name="sender_only">Iba odosielateľ</string>
<string name="enable_delivery_reports">Povoliť správy o doručení</string>
<string name="use_simple_characters">Odstrániť diakritiku pri odosielaní správ</string>
<string name="mms_file_size_limit">Zmenšiť MMS obrázky pri odosielaní</string>
<string name="mms_file_size_limit_none">Žiadny limit</string>
<!-- FAQ -->
<string name="faq_1_title">Prečo vyžaduje apka prístup na internet?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Uygulama neden internete erişim gerektiriyor?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">Чому додаток потрубує доступу до інтернету?</string>

View File

@ -49,6 +49,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- FAQ -->
<string name="faq_1_title">为什么该应用需要访问互联网?</string>

View File

@ -2,4 +2,11 @@
<string name="package_name">com.simplemobiletools.smsmessenger</string>
<string name="mms_file_size_limit_100kb">100KB</string>
<string name="mms_file_size_limit_200kb">200KB</string>
<string name="mms_file_size_limit_300kb">300KB</string>
<string name="mms_file_size_limit_600kb">600KB</string>
<string name="mms_file_size_limit_1mb">1MB</string>
<string name="mms_file_size_limit_2mb">2MB</string>
</resources>

View File

@ -47,6 +47,9 @@
<string name="sender_and_message">Sender and message</string>
<string name="sender_only">Sender only</string>
<string name="enable_delivery_reports">Enable delivery reports</string>
<string name="use_simple_characters">Remove accents and diacritics at sending messages</string>
<string name="mms_file_size_limit">Resize sent MMS images</string>
<string name="mms_file_size_limit_none">No limit</string>
<!-- Export / Import -->
<string name="messages">Messages</string>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<cache-path name="compressed_files" path="compressed/"/>
</paths>

View File

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.5.21'
ext.kotlin_version = '1.5.30'
repositories {
google()
jcenter()

View File

@ -0,0 +1,4 @@
* Automatically resize sent MMS image attachments by default, allow customizing the limit
* Added Draft support
* Allow marking conversations un/read from the main screen
* Some other stability, UX and translation improvements