diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1b1aa9ae..4d98ad7a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -46,50 +46,50 @@
diff --git a/app/src/main/kotlin/com/tutpro/baresip/AboutActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/AboutActivity.kt
index d20cf905..85c668ce 100644
--- a/app/src/main/kotlin/com/tutpro/baresip/AboutActivity.kt
+++ b/app/src/main/kotlin/com/tutpro/baresip/AboutActivity.kt
@@ -14,7 +14,7 @@ class AboutActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_about)
val aboutText = findViewById(R.id.aboutText) as TextView
- aboutText.text = String.format(getText(R.string.aboutText).toString(),
+ aboutText.text = String.format(getText(R.string.about_text).toString(),
BuildConfig.VERSION_NAME)
aboutText.setTextColor(Color.BLACK)
}
diff --git a/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt
index 2b3df81c..e1e6d2ae 100644
--- a/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt
+++ b/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt
@@ -390,43 +390,47 @@ class AccountActivity : AppCompatActivity() {
fun onClick(v: View) {
when (v) {
findViewById(R.id.DisplayNameTitle) as TextView-> {
- Utils.alertView(this, "Display Name", getString(R.string.dispName))
+ Utils.alertView(this, getString(R.string.display_name),
+ getString(R.string.display_name_help))
}
findViewById(R.id.AuthUserTitle) as TextView -> {
- Utils.alertView(this, "Authentication Username",
- getString(R.string.authUser))
+ Utils.alertView(this, getString(R.string.authentication_username),
+ getString(R.string.authentication_username_help))
}
findViewById(R.id.AuthPassTitle) as TextView-> {
- Utils.alertView(this, "Authentication Password",
- getString(R.string.authPass))
+ Utils.alertView(this, getString(R.string.authentication_password),
+ getString(R.string.authentication_password_help))
}
findViewById(R.id.OutboundProxyTitle) as TextView -> {
- Utils.alertView(this, "Outbound Proxies",
- getString(R.string.obProxies))
+ Utils.alertView(this, getString(R.string.outbound_proxies),
+ getString(R.string.outbound_proxies_help))
}
findViewById(R.id.RegTitle) as TextView -> {
- Utils.alertView(this, "Register", getString(R.string.register))
- }
- findViewById(R.id.MediaNatTitle) as TextView -> {
- Utils.alertView(this, "Media NAT Traversal", getString(R.string.mediaNat))
- }
- findViewById(R.id.StunServerTitle) as TextView -> {
- Utils.alertView(this, "STUN Server", getString(R.string.stunServer))
+ Utils.alertView(this, "Register", getString(R.string.register_help))
}
findViewById(R.id.AudioCodecsTitle) as TextView -> {
- Utils.alertView(this, "Audio Codecs", getString(R.string.auCodecs))
+ Utils.alertView(this, getString(R.string.audio_codecs),
+ getString(R.string.audio_codecs_help))
+ }
+ findViewById(R.id.MediaNatTitle) as TextView -> {
+ Utils.alertView(this, getString(R.string.media_nat),
+ getString(R.string.media_nat_help))
+ }
+ findViewById(R.id.StunServerTitle) as TextView -> {
+ Utils.alertView(this, getString(R.string.stun_server),
+ getString(R.string.stun_server_help))
}
findViewById(R.id.MediaEncTitle) as TextView -> {
- Utils.alertView(this, "Media Encryption",
- getText(R.string.mediaEnc).toString())
+ Utils.alertView(this, getString(R.string.media_encryption),
+ getString(R.string.media_encryption_help))
}
findViewById(R.id.VoicemailUriTitle) as TextView -> {
- Utils.alertView(this, "Voicemail URI",
- getText(R.string.vmUri).toString())
+ Utils.alertView(this, getString(R.string.voicemail_uri),
+ getString(R.string.voicemain_uri_help))
}
findViewById(R.id.DefaultTitle) as TextView -> {
- Utils.alertView(this, "Default Account",
- getText(R.string.defaultAccount).toString())
+ Utils.alertView(this, getString(R.string.default_account),
+ getText(R.string.default_account_help).toString())
}
}
}
diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt
index 15e69969..10396a79 100644
--- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt
+++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt
@@ -351,7 +351,7 @@ class BaresipService: Service() {
R.color.colorBaresip))
.setContentIntent(pi)
.setAutoCancel(true)
- .setContentTitle("Incoming call from")
+ .setContentTitle(getString(R.string.incoming_call_from))
.setContentText(caller)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
nb.setVibrate(LongArray(0))
@@ -368,8 +368,10 @@ class BaresipService: Service() {
rejectIntent.putExtra("callp", callp)
val rejectPendingIntent = PendingIntent.getService(this,
REJECT_REQ_CODE, rejectIntent, PendingIntent.FLAG_UPDATE_CURRENT)
- nb.addAction(R.drawable.ic_stat, "Answer", answerPendingIntent)
- nb.addAction(R.drawable.ic_stat, "Reject", rejectPendingIntent)
+ nb.addAction(R.drawable.ic_stat, getString(R.string.answer),
+ answerPendingIntent)
+ nb.addAction(R.drawable.ic_stat, getString(R.string.reject),
+ rejectPendingIntent)
nm.notify(CALL_NOTIFICATION_ID, nb.build())
return
}
@@ -436,7 +438,7 @@ class BaresipService: Service() {
.setContentIntent(pi)
.setDefaults(Notification.DEFAULT_SOUND)
.setAutoCancel(true)
- .setContentTitle("Call transfer request to")
+ .setContentTitle(getString(R.string.transfer_request))
.setContentText(target)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
nb.setVibrate(LongArray(0))
@@ -455,8 +457,10 @@ class BaresipService: Service() {
denyIntent.putExtra("callp", callp)
val denyPendingIntent = PendingIntent.getService(this,
DENY_REQ_CODE, denyIntent, PendingIntent.FLAG_UPDATE_CURRENT)
- nb.addAction(R.drawable.ic_stat, "Accept", acceptPendingIntent)
- nb.addAction(R.drawable.ic_stat, "Deny", denyPendingIntent)
+ nb.addAction(R.drawable.ic_stat, getString(R.string.accept),
+ acceptPendingIntent)
+ nb.addAction(R.drawable.ic_stat, getString(R.string.deny),
+ denyPendingIntent)
nm.notify(TRANSFER_NOTIFICATION_ID, nb.build())
return
}
@@ -541,7 +545,7 @@ class BaresipService: Service() {
.setContentIntent(pi)
.setSound(Settings.System.DEFAULT_NOTIFICATION_URI)
.setAutoCancel(true)
- .setContentTitle("Message from $sender")
+ .setContentTitle(getString(R.string.message_from) + " " + sender)
.setContentText(text)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
nb.setVibrate(LongArray(0))
diff --git a/app/src/main/kotlin/com/tutpro/baresip/ChatActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/ChatActivity.kt
index 4e493ba9..4668ac57 100644
--- a/app/src/main/kotlin/com/tutpro/baresip/ChatActivity.kt
+++ b/app/src/main/kotlin/com/tutpro/baresip/ChatActivity.kt
@@ -59,10 +59,10 @@ class ChatActivity : AppCompatActivity() {
else
chatPeer = chatPeer.substring(4)
}
- setTitle("Chat with $chatPeer")
+ setTitle("${getString(R.string.chat_with)} $chatPeer")
val headerView = findViewById(R.id.account) as TextView
- val headerText = "Account ${aor.substringAfter(":")}"
+ val headerText = "${getString(R.string.account)} ${aor.substringAfter(":")}"
headerView.text = headerText
listView = findViewById(R.id.messages) as ListView
@@ -99,16 +99,17 @@ class ChatActivity : AppCompatActivity() {
}
}
val builder = AlertDialog.Builder(this@ChatActivity, R.style.Theme_AppCompat)
- if (chatPeer.contains("@") || Utils.checkTelNo(chatPeer))
- builder.setMessage("Do you want to delete message or add peer $chatPeer to contacts?")
- .setPositiveButton("Cancel", dialogClickListener)
- .setNegativeButton("Delete Message", dialogClickListener)
- .setNeutralButton("Add Contact", dialogClickListener)
+ if (ContactsActivity.contactName(peerUri) == peerUri)
+ builder.setMessage(String.format(getText(R.string.long_message_question).toString(),
+ chatPeer))
+ .setPositiveButton(getString(R.string.cancel), dialogClickListener)
+ .setNegativeButton(getString(R.string.delete_message), dialogClickListener)
+ .setNeutralButton(getString(R.string.add_contact), dialogClickListener)
.show()
else
- builder.setMessage("Do you want to delete message?")
- .setPositiveButton("Cancel", dialogClickListener)
- .setNegativeButton("Delete Message", dialogClickListener)
+ builder.setMessage(getText(R.string.short_message_question))
+ .setPositiveButton(getString(R.string.cancel), dialogClickListener)
+ .setNegativeButton(getString(R.string.delete_message), dialogClickListener)
.show()
true
}
@@ -133,10 +134,10 @@ class ChatActivity : AppCompatActivity() {
Message.add(msg)
chatMessages.add(msg)
if (Api.message_send(ua.uap, peerUri, msgText, time.toString()) != 0) {
- Toast.makeText(getApplicationContext(), "Sending of message failed!",
+ Toast.makeText(getApplicationContext(), "${getString(R.string.message_failed)}!",
Toast.LENGTH_SHORT).show()
msg.direction = R.drawable.arrow_up_red
- msg.responseReason = "Sending of message failed"
+ msg.responseReason = getString(R.string.message_failed)
} else {
newMessage.text.clear()
BaresipService.chatTexts.remove("$aor::$peerUri")
diff --git a/app/src/main/kotlin/com/tutpro/baresip/ConfigActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/ConfigActivity.kt
index 1d12aa5c..b3ade67f 100644
--- a/app/src/main/kotlin/com/tutpro/baresip/ConfigActivity.kt
+++ b/app/src/main/kotlin/com/tutpro/baresip/ConfigActivity.kt
@@ -218,31 +218,39 @@ class ConfigActivity : AppCompatActivity() {
fun onClick(v: View) {
when (v) {
findViewById(R.id.AutoStartTitle) as TextView-> {
- Utils.alertView(this, "Start Automatically", getString(R.string.autoStart))
+ Utils.alertView(this, getString(R.string.start_automatically),
+ getString(R.string.start_automatically_help))
}
findViewById(R.id.ListenAddressTitle) as TextView-> {
- Utils.alertView(this, "Listen Address", getString(R.string.listenAddress))
+ Utils.alertView(this, getString(R.string.listen_address),
+ getString(R.string.listen_address_help))
}
findViewById(R.id.PreferIPv6Title) as TextView-> {
- Utils.alertView(this, "Prefer IPv6", getString(R.string.preferIPv6))
+ Utils.alertView(this, getString(R.string.prefer_ipv6),
+ getString(R.string.prefer_ipv6_help))
}
findViewById(R.id.DnsServersTitle) as TextView -> {
- Utils.alertView(this, "DNS Servers", getString(R.string.dnsServers))
+ Utils.alertView(this, getString(R.string.dns_servers),
+ getString(R.string.dns_servers_help))
}
findViewById(R.id.OpusBitRateTitle) as TextView-> {
- Utils.alertView(this, "Opus Bit Rate", getString(R.string.opusBitRate))
+ Utils.alertView(this, getString(R.string.opus_bit_rate),
+ getString(R.string.opus_bit_rate_help))
}
findViewById(R.id.IceLiteTitle) as TextView-> {
- Utils.alertView(this, "ICE Lite Mode", getString(R.string.iceLite))
+ Utils.alertView(this, getString(R.string.ice_lite_mode),
+ getString(R.string.ice_lite_mode_help))
}
findViewById(R.id.VolumeTitle) as TextView-> {
- Utils.alertView(this, "Call Volume", getString(R.string.callVolume))
+ Utils.alertView(this, getString(R.string.default_call_volume),
+ getString(R.string.default_call_volume_help))
}
findViewById(R.id.DebugTitle) as TextView-> {
- Utils.alertView(this, "Debug", getString(R.string.debug))
+ Utils.alertView(this, getString(R.string.debug), getString(R.string.debug_help))
}
findViewById(R.id.ResetTitle) as TextView-> {
- Utils.alertView(this, "Reset", getString(R.string.reset))
+ Utils.alertView(this, getString(R.string.reset_config),
+ getString(R.string.reset_config_help))
}
}
}
diff --git a/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt
index 7e4563b9..cb6317f9 100644
--- a/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt
+++ b/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt
@@ -208,18 +208,18 @@ class MainActivity : AppCompatActivity() {
securityButton.setOnClickListener {
when (securityButton.tag) {
"red" -> {
- Utils.alertView(this, "Alert", "This call is NOT secure!")
+ Utils.alertView(this, getString(R.string.alert),
+ getString(R.string.call_not_secure))
}
"yellow" -> {
- Utils.alertView(this, "Alert",
- "This call is SECURE, but peer is NOT verified!")
+ Utils.alertView(this, getString(R.string.alert),
+ getString(R.string.peer_not_verified))
}
"green" -> {
val unverifyDialog = AlertDialog.Builder(this)
- unverifyDialog.setTitle("Info")
- unverifyDialog.setMessage("This call is SECURE and peer is VERIFIED! " +
- "Do you want to unverify the peer?")
- unverifyDialog.setPositiveButton("Unverify") { dialog, _ ->
+ unverifyDialog.setTitle(getString(R.string.info))
+ unverifyDialog.setMessage(getString(R.string.call_is_secure))
+ unverifyDialog.setPositiveButton(getString(R.string.unverify)) { dialog, _ ->
val calls = Call.uaCalls(UserAgent.uas()[aorSpinner.selectedItemPosition],
"")
if (calls.size > 0) {
@@ -233,7 +233,7 @@ class MainActivity : AppCompatActivity() {
}
dialog.dismiss()
}
- unverifyDialog.setNegativeButton("No") { dialog, _ ->
+ unverifyDialog.setNegativeButton(getString(R.string.no)) { dialog, _ ->
dialog.dismiss()
}
unverifyDialog.create().show()
@@ -257,7 +257,8 @@ class MainActivity : AppCompatActivity() {
}
}
if (!Utils.checkSipUri(uri))
- Utils.alertView(this, "Notice", "Invalid SIP URI '$uri'")
+ Utils.alertView(this, getString(R.string.notice),
+ "${getString(R.string.invalid_sip_uri)} '$uri'")
else
call(ua, uri, "outgoing")
} else {
@@ -328,11 +329,11 @@ class MainActivity : AppCompatActivity() {
val rate = status.split('=')[1]
val txCodec = codecs.split(',')[0].split("/")
val rxCodec = codecs.split(',')[1].split("/")
- Utils.alertView(this, "Call Info",
- "Duration: $duration\n" +
- "Codecs: ${txCodec[0]} ch ${txCodec[2]}/" +
+ Utils.alertView(this, getString(R.string.call_info),
+ "${getString(R.string.duration)}: $duration\n" +
+ "${getString(R.string.codecs)}: ${txCodec[0]} ch ${txCodec[2]}/" +
"${rxCodec[0]} ch ${rxCodec[2]}\n" +
- "Rate: $rate")
+ "${getString(R.string.rate)}: $rate")
}
}
}
@@ -359,10 +360,10 @@ class MainActivity : AppCompatActivity() {
}
val builder = AlertDialog.Builder(this@MainActivity,
R.style.Theme_AppCompat)
- builder.setTitle("Voicemail Messages")
+ builder.setTitle(getString(R.string.voicemail_messages))
builder.setMessage(acc.vmMessage())
- .setPositiveButton("Cancel", dialogClickListener)
- .setNegativeButton("Check", dialogClickListener)
+ .setPositiveButton(getString(R.string.cancel), dialogClickListener)
+ .setNegativeButton(getString(R.string.check), dialogClickListener)
.show()
}
}
@@ -447,7 +448,7 @@ class MainActivity : AppCompatActivity() {
when (action) {
"call" -> {
if (!Call.calls().isEmpty()) {
- Toast.makeText(applicationContext, "You already have an active call!",
+ Toast.makeText(applicationContext, getString(R.string.call_already_active),
Toast.LENGTH_SHORT).show()
return
}
@@ -561,9 +562,9 @@ class MainActivity : AppCompatActivity() {
Log.d("Baresip", "Handling service event 'stopped' with param ${params[0]}")
if (params[0] != "") {
val alertDialog = AlertDialog.Builder(this).create()
- alertDialog.setTitle("Notice")
- alertDialog.setMessage("Baresip failed to start! Listen Address was reset. Restart baresip.")
- alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK"
+ alertDialog.setTitle(getString(R.string.notice))
+ alertDialog.setMessage(getString(R.string.start_failed))
+ alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, getString(R.string.ok)
) { dialog, _ ->
dialog.dismiss()
quitTimer.cancel()
@@ -601,7 +602,8 @@ class MainActivity : AppCompatActivity() {
"registering failed" -> {
uaAdapter.notifyDataSetChanged()
Toast.makeText(applicationContext,
- "Registering of $aor failed: ${ev[1]}",
+ String.format(getText(R.string.registering_failed).toString(),
+ aor) + ": ${ev[1]}",
Toast.LENGTH_LONG).show()
}
"call ringing" -> {
@@ -618,7 +620,7 @@ class MainActivity : AppCompatActivity() {
Manifest.permission.RECORD_AUDIO) ==
PackageManager.PERMISSION_DENIED) {
Toast.makeText(applicationContext,
- "You have not granted microphone permission.",
+ getString(R.string.no_microphone_permission),
Toast.LENGTH_SHORT).show()
Api.ua_hangup(uap, callp, 486, "Busy Here")
return
@@ -633,7 +635,7 @@ class MainActivity : AppCompatActivity() {
(ua != UserAgent.uas()[aorSpinner.selectedItemPosition])) {
aorSpinner.setSelection(account_index)
} else {
- callTitle.text = "Incoming call from ..."
+ callTitle.text = getString(R.string.incoming_call_from_dots)
callUri.setAdapter(null)
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI),
Utils.aorDomain(ua.account.aor)))
@@ -665,9 +667,9 @@ class MainActivity : AppCompatActivity() {
setVolumeControlStream(AudioManager.STREAM_VOICE_CALL)
if (ua == UserAgent.uas()[aorSpinner.selectedItemPosition]) {
if (call.dir == "in")
- callTitle.text = "Incoming call from ..."
+ callTitle.text = getString(R.string.incoming_call_from_dots)
else
- callTitle.text = "Outgoing call to ..."
+ callTitle.text = getString(R.string.outgoing_call_to_dots)
if (acc.mediaEnc == "") {
securityButton.visibility = View.INVISIBLE
} else {
@@ -683,7 +685,7 @@ class MainActivity : AppCompatActivity() {
holdButton.setImageResource(R.drawable.pause)
holdButton.visibility = View.VISIBLE
dtmf.setText("")
- dtmf.hint = "DTMF"
+ dtmf.hint = getString(R.string.dtmf)
dtmf.visibility = View.VISIBLE
dtmf.requestFocus()
if (dtmfWatcher != null) dtmf.removeTextChangedListener(dtmfWatcher)
@@ -700,9 +702,9 @@ class MainActivity : AppCompatActivity() {
return
}
val verifyDialog = AlertDialog.Builder(this@MainActivity)
- verifyDialog.setTitle("Verify")
- verifyDialog.setMessage("Do you want to verify SAS <${ev[1]}> <${ev[2]}>?")
- verifyDialog.setPositiveButton("Yes") { dialog, _ ->
+ verifyDialog.setTitle(getString(R.string.verify))
+ verifyDialog.setMessage("${getString(R.string.verify_sas)} <${ev[1]}> <${ev[2]}>?")
+ verifyDialog.setPositiveButton(getString(R.string.yes)) { dialog, _ ->
val security: Int
if (Api.cmd_exec("zrtp_verify ${ev[3]}") != 0) {
Log.e("Baresip", "Command 'zrtp_verify ${ev[3]}' failed")
@@ -719,7 +721,7 @@ class MainActivity : AppCompatActivity() {
dialog.dismiss()
}
}
- verifyDialog.setNegativeButton("No") { dialog, _ ->
+ verifyDialog.setNegativeButton(getString(R.string.no)) { dialog, _ ->
call.security = R.drawable.box_yellow
call.zid = ev[3]
if (ua == UserAgent.uas()[aorSpinner.selectedItemPosition]) {
@@ -758,15 +760,15 @@ class MainActivity : AppCompatActivity() {
val transferDialog = AlertDialog.Builder(this)
val target = Utils.friendlyUri(ContactsActivity.contactName(ev[1]),
Utils.aorDomain(aor))
- transferDialog.setMessage("Do you accept to transfer call to $target?")
- transferDialog.setPositiveButton("Yes") { dialog, _ ->
+ transferDialog.setMessage("${getString(R.string.transfer_query)} $target?")
+ transferDialog.setPositiveButton(getString(R.string.yes)) { dialog, _ ->
if (call in Call.calls())
Api.ua_hangup(uap, callp, 0, "")
call(ua, ev[1], "transferring")
showCall(ua)
dialog.dismiss()
}
- transferDialog.setNegativeButton("No") { dialog, _ ->
+ transferDialog.setNegativeButton(getString(R.string.no)) { dialog, _ ->
if (call in Call.calls())
Api.call_notify_sipfrag(callp, 603, "Decline")
dialog.dismiss()
@@ -795,10 +797,12 @@ class MainActivity : AppCompatActivity() {
val param = ev[1].trim()
if ((param != "") && (Call.uaCalls(ua, "").size == 0)) {
if (param.get(0).isDigit())
- Toast.makeText(applicationContext, "Call failed: $param",
+ Toast.makeText(applicationContext,
+ "${getString(R.string.call_failed)}: $param",
Toast.LENGTH_LONG).show()
else
- Toast.makeText(applicationContext, "Call closed: $param",
+ Toast.makeText(applicationContext,
+ "${getString(R.string.call_closed)}: $param",
Toast.LENGTH_LONG).show()
}
}
@@ -959,8 +963,8 @@ class MainActivity : AppCompatActivity() {
CONFIG_CODE -> {
if ((resultCode == RESULT_OK) &&
(data!!.getBooleanExtra("restart", true)))
- Utils.alertView(this, "Notice",
- "You need to restart baresip in order to activate the new config!")
+ Utils.alertView(this, getString(R.string.notice),
+ getString(R.string.restart_needed))
if (resultCode == RESULT_CANCELED)
Log.d("Baresip", "Config canceled")
}
@@ -1000,7 +1004,7 @@ class MainActivity : AppCompatActivity() {
if (ContextCompat.checkSelfPermission(applicationContext, Manifest.permission.RECORD_AUDIO)
== PackageManager.PERMISSION_DENIED) {
Toast.makeText(applicationContext,
- "You have not granted microphone permission.", Toast.LENGTH_SHORT).show()
+ getString(R.string.no_microphone_permission), Toast.LENGTH_SHORT).show()
return
}
if (ua != UserAgent.uas()[aorSpinner.selectedItemPosition])
@@ -1073,9 +1077,9 @@ class MainActivity : AppCompatActivity() {
private fun showCall(ua: UserAgent) {
if (Call.uaCalls(ua, "").size == 0) {
- callTitle.text = "Outgoing call to ..."
+ callTitle.text = getString(R.string.outgoing_call_to_dots)
callUri.text.clear()
- callUri.hint = "Callee"
+ callUri.hint = getString(R.string.callee)
callUri.isFocusable = true
callUri.isFocusableInTouchMode = true
imm.hideSoftInputFromWindow(callUri.windowToken, 0)
@@ -1096,11 +1100,11 @@ class MainActivity : AppCompatActivity() {
if (callsOut.size > 0) {
call = callsOut[callsOut.size - 1]
if (call.status == "transferring")
- callTitle.text = "Transferring call to ..."
+ callTitle.text = getString(R.string.transferring_call_to_dots)
else
- callTitle.text = "Outgoing call to ..."
+ callTitle.text = getString(R.string.outgoing_call_to_dots)
} else {
- callTitle.text = "Incoming call from ..."
+ callTitle.text = getString(R.string.incoming_call_from_dots)
call = callsIn[callsIn.size - 1]
}
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI),
diff --git a/app/src/main/res/layout/activity_account.xml b/app/src/main/res/layout/activity_account.xml
index 201cc407..e592f39f 100644
--- a/app/src/main/res/layout/activity_account.xml
+++ b/app/src/main/res/layout/activity_account.xml
@@ -23,13 +23,13 @@
android:textSize="18sp"
android:textColor="@android:color/black"
android:onClick="onClick"
- android:text="Display Name" >
+ android:text="@string/display_name" >
@@ -42,13 +42,13 @@
android:textSize="18sp"
android:textColor="@android:color/black"
android:onClick="onClick"
- android:text="Authentication Username" >
+ android:text="@string/authentication_username" >
@@ -61,13 +61,13 @@
android:textSize="18sp"
android:textColor="@android:color/black"
android:onClick="onClick"
- android:text="Authentication Password" >
+ android:text="@string/authentication_password" >
@@ -80,13 +80,13 @@
android:textSize="18sp"
android:textColor="@android:color/black"
android:onClick="onClick"
- android:text="Outbound Proxies" >
+ android:text="@string/outbound_proxies" >
@@ -95,7 +95,7 @@
@@ -113,7 +113,7 @@
android:textSize="18sp"
android:textColor="@android:color/black"
android:onClick="onClick"
- android:text="Register" >
+ android:text="@string/register" >
+ android:text="@string/audio_codecs" >
+ android:text="@string/media_nat" >
+ android:text="@string/stun_server" >
+ android:text="@string/media_encryption" >
+ android:text="@string/voicemail_uri" >
@@ -232,7 +232,7 @@
android:textSize="18sp"
android:textColor="@android:color/black"
android:onClick="onClick"
- android:text="Default Account" >
+ android:text="@string/default_account" >
+ android:hint="@string/sip_uri_user_domain" >
+ android:hint="@string/new_message" >
+ android:hint="@string/new_chat_peer" >
+ android:text="@string/start_automatically" >
@@ -60,7 +60,7 @@
android:layout_centerVertical="true"
android:layout_marginBottom="12dp"
android:textSize="18sp"
- android:hint="0.0.0.0:5060" >
+ android:hint="@string/_0_0_0_0_5060" >
+ android:text="@string/prefer_ipv6" >
@@ -124,7 +124,7 @@
android:textSize="18sp"
android:textColor="@android:color/black"
android:onClick="onClick"
- android:text="Opus Bit Rate" >
+ android:text="@string/opus_bit_rate" >
+ android:text="@string/ice_lite_mode" >
+ android:text="@string/default_call_volume" >
+ android:text="@string/debug" >
+ android:text="@string/reset_config" >
+ android:text="@string/contact_name" >
+ android:text="@string/sip_uri" >
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 643784c4..89bda16d 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -39,7 +39,7 @@
android:paddingStart="3dp"
android:textSize="20sp"
android:textColor="@android:color/black"
- android:text="Outgoing call to ..." >
+ android:text="@string/outgoing_call_to_dots" >
+ android:hint="@string/callee" >
@@ -140,7 +140,7 @@
android:layout_marginStart="140dp"
android:inputType="phone"
android:textSize="20sp"
- android:hint="DTMF"
+ android:hint="@string/dtmf"
android:visibility="invisible" >
diff --git a/app/src/main/res/layout/call_notification.xml b/app/src/main/res/layout/call_notification.xml
index 513ae8aa..989fac53 100644
--- a/app/src/main/res/layout/call_notification.xml
+++ b/app/src/main/res/layout/call_notification.xml
@@ -26,7 +26,7 @@
android:layout_gravity="center"
android:textSize="15dp"
android:textColor="#000000"
- android:text="Baresip "
+ android:text="@string/app_name"
style = "@android:style/TextAppearance.Medium" />
@@ -49,7 +49,7 @@
android:layout_marginBottom="14dp"
android:layout_marginStart="16dp"
android:layout_gravity="center"
- android:text="Answer" />
+ android:text="@string/answer" />
+ android:text="@string/reject" />
diff --git a/app/src/main/res/layout/password_dialog.xml b/app/src/main/res/layout/password_dialog.xml
index f971b727..46751652 100644
--- a/app/src/main/res/layout/password_dialog.xml
+++ b/app/src/main/res/layout/password_dialog.xml
@@ -12,7 +12,7 @@
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:hint="Password"
+ android:hint="@string/password"
android:imeOptions="actionDone"
android:inputType="textPassword" />
diff --git a/app/src/main/res/layout/status_notification.xml b/app/src/main/res/layout/status_notification.xml
index 0c16b0aa..0c560773 100644
--- a/app/src/main/res/layout/status_notification.xml
+++ b/app/src/main/res/layout/status_notification.xml
@@ -19,7 +19,7 @@
android:layout_gravity="center"
android:textSize="15dp"
android:textColor="#000000"
- android:text="Baresip "
+ android:text="@string/app_name"
style = "@android:style/TextAppearance.Medium" />
diff --git a/app/src/main/res/menu/accounts_menu.xml b/app/src/main/res/menu/accounts_menu.xml
index 2fa8d185..eac60e9a 100644
--- a/app/src/main/res/menu/accounts_menu.xml
+++ b/app/src/main/res/menu/accounts_menu.xml
@@ -1,9 +1,9 @@
diff --git a/app/src/main/res/menu/contacts_menu.xml b/app/src/main/res/menu/contacts_menu.xml
index 227b4ba3..e86cb3c2 100644
--- a/app/src/main/res/menu/contacts_menu.xml
+++ b/app/src/main/res/menu/contacts_menu.xml
@@ -1,9 +1,9 @@
diff --git a/app/src/main/res/menu/main_menu.xml b/app/src/main/res/menu/main_menu.xml
index 76c3af9a..6c413ff7 100644
--- a/app/src/main/res/menu/main_menu.xml
+++ b/app/src/main/res/menu/main_menu.xml
@@ -1,15 +1,15 @@
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e5f5fc2e..6d85ae97 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,23 +1,34 @@
+
baresip
-
- Baresip based Android application\n\n
+
+
+ About baresip
+
+ Baresip library based Android application\n\n
Juha Heinanen jh@tutpro.com\n\n
Version %1$s\n\n
Usage Hints\n\n
- • Check that config default values meet your needs (click item titles for help).\n
+ • Check that configuration default values meet your needs (click item titles for help).\n
• Then create one or more accounts (again click item titles for help).\n
• Peers of calls and messages can be added to contacts by long clicks.\n
• Long clicks can also be used to remove calls, chats, messages, and contacts.\n
• Call click when callee has not been given can be used for re-dial.\n
• If you cannot hear the other party of a call, try to increase Media volume.\n
- No accounts
- Name (if any) used in From URI of outbound requests.
- Authentication username if required by outbound proxy.
- Authentication password if required by outbound proxy.
- SIP URI of one or two proxies that must be used when sending requests.
+
+
+ Account
+ Display Name
+ Your Name
+ Name (if any) used in From URI of outbound requests.
+ Authentication Username
+ Authentication username if required by outbound proxy.
+ Authentication Password
+ Authentication password if required by outbound proxy.
+ Outbound Proxies
+ SIP URI of one or two proxies that must be used when sending requests.
If two is given, REGISTER requests are sent to both and other requests are sent to
one that responds. If no outbound proxy is given, requests are sent based on
DNS NAPTR/SRV/A record lookup of callee URI hostpart. If hostpart of SIP URI is an IPv6
@@ -25,19 +36,26 @@
• sip:foo.com:5060;transport=tls\n
• sip:[2001:67c:223:777::10]:5060;transport=tcp
- If checked, registration is enabled and REGISTER requests are sent at
+ SIP URI of Proxy Server
+ SIP URI of another Proxy Server
+ Register
+ If checked, registration is enabled and REGISTER requests are sent at
12 minute intervals.
- Selects media NAT traversal protocol (if any). Possible choices are STUN
+ Audio Codecs
+ List of supported audio codecs in priority order.
+ Media NAT Traversal
+ Selects media NAT traversal protocol (if any). Possible choices are STUN
(Session Traversal Utilities for NAT, RFC 5389) and ICE (Interactive Connectivity
Establishment, RFC 5245).
- A STUN Server of form host[:port].
+ STUN Server
+ A STUN Server of form host[:port].
Factory default value is \'stun.l.google.com:19302\', pointing to public Google STUN server.
Username and password are currently not supported.
- List of supported audio codecs in priority order.
- Selects media transport encryption protocol.\n
+ Media Encryption
+ Selects media transport encryption protocol.\n
• ZRTP (recommended) means that ZRTP end-to-end media encryption negotiation is tried after
the call has been established.\n
• DTLS-SRTPF means that UDP/TLS/RTP/SAVPF is offered in outgoing call and that RTP/SAVP,
@@ -49,27 +67,130 @@
• None means that media encryption is not supported and that media transport protocol
thus is RTP/AVP.
- SIP URI for checking of voicemail messages. If left empty, voicemail
+ Voicemail URI
+ SIP URI for checking of voicemail messages. If left empty, voicemail
messages (Message Waiting Indications) are not subscribed to.
- >
- If checked, this account is selected when baresip is started.
- >
- If checked, baresip starts automatically after device (re)start.
- IP address and port of form \'address:port\' at which baresip listens
+
+ Default Account
+ If checked, this account is selected when baresip is started.
+
+
+
+ Accounts
+ SIP URI user@domain
+ Export
+ Import
+
+
+ Answer
+ Reject
+ Incoming call from
+ Call transfer request to
+ Message from
+
+
+ Call History
+
+
+ Chat Messages
+ Chat with
+ New message
+ Do you want to delete message or add peer %1$s to contacts?
+ Do you want to delete message?
+ Delete Message
+ Add Contact
+ Sending of message failed
+
+
+
+ Chat History
+ New Chat Peer
+
+
+ Configuration
+ Start Automatically
+ If checked, baresip starts automatically after device (re)start.
+ Listen Address
+ IP address and port of form \'address:port\' at which baresip listens
for incoming SIP requests. If IP address is an IPv6 address, it must be written inside
brackets []. IPv4 address 0.0.0.0 or IPv6 address [::] makes baresip listen at all
available addresses. If left empty (factory default), baresip listens at port 5060 of
all available addresses.
- Prefer IPv6 if both IPv4 and IPv6 are available.
- Comma separated list of DNS servers. Each DNS server is of form
+ 0.0.0.0:5060
+ Prefer IPv6
+ Prefer IPv6 if both IPv4 and IPv6 are available.
+ DNS Servers
+ Comma separated list of DNS servers. Each DNS server is of form
\'server:port\'. If server is an IPv6 address, the address must be written inside brackets [].
Factory default value is \'8.8.8.8:53,[2001:4860:4860::8888]:53\' pointing to public Google
DNS servers.
- Average maximum bit rate used by Opus audio stream.
+ Opus Bit Rate
+ Average maximum bit rate used by Opus audio stream.
Valid value are 6000-510000. Factory default is 28000.
- If checked, ICE Lite Mode is used.
- If set, default call audio volume at scale 1-10.
- If checked, debug and info level log messages are available in logcat.
- If checked, configuration is reset to factory default.
+ ICE Lite Mode
+ If checked, ICE Lite Mode is used.
+ Default Call Volume
+ If set, default call audio volume at scale 1–10.
+ Debug
+ If checked, debug and info level log messages are available in logcat.
+ Reset to Factory Default
+ If checked, configuration is reset to factory default.
+
+
+ Contact
+ Contact Name
+ Export
+ Import
+
+
+ Contacts
+
+
+ Alert
+ Info
+ Notice
+ Cancel
+ Check
+ OK
+ Yes
+ No
+ Accept
+ Deny
+ User ID
+ Password
+ SIP URI
+ …
+
+
+ About
+ Quit
+ Outgoing call to …
+ Incoming call from …
+ Transferring call to …
+ Invalid SIP URI
+ Callee
+ DTMF
+ Call Info
+ Duration
+ Codecs
+ Rate
+ Voicemail Messages
+ You already have an active call!
+ Baresip failed to start! Listen Address was reset.
+ Restart baresip.
+ Registering of %1$s failed
+ You have not granted microphone permission.
+ Verify
+ Do you want to verify SAS
+ Do you accept to transfer call to
+ Call failed
+ Call closed
+ You need to restart baresip in order to activate the new config!
+ This call is NOT secure!
+ This call is SECURE, but peer is NOT verified!
+ This call is SECURE and peer is VERIFIED!
+ Do you want to unverify the peer?
+ Unverify
+
diff --git a/fastlane/metadata/android/en-US/changelogs/7.3.0.txt b/fastlane/metadata/android/en-US/changelogs/7.3.0.txt
new file mode 100644
index 00000000..5c827b7f
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/7.3.0.txt
@@ -0,0 +1,3 @@
+- Account's media NAT protocol can now be chosen between STUN, ICE, or none.
+- Set account's status to yellow immediately when account's registration
+ is disabled.