- Replaced all strings with string resource references.

- Added missing 7.3.0 changelog file.
This commit is contained in:
Juha Heinanen
2019-05-08 13:42:11 +03:00
parent 9033f2b07c
commit adbf62ad7d
22 changed files with 323 additions and 178 deletions

View File

@ -46,50 +46,50 @@
</activity> </activity>
<activity <activity
android:name=".AccountsActivity" android:name=".AccountsActivity"
android:label="Accounts" android:label="@string/accounts"
android:parentActivityName=".MainActivity"> android:parentActivityName=".MainActivity">
</activity> </activity>
<activity <activity
android:name=".AccountActivity" android:name=".AccountActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:label="Account" android:label="@string/account"
android:parentActivityName=".AccountsActivity"> android:parentActivityName=".AccountsActivity">
</activity> </activity>
<activity <activity
android:name=".ContactsActivity" android:name=".ContactsActivity"
android:label="Contacts" android:label="@string/contacts"
android:windowSoftInputMode="adjustPan" android:windowSoftInputMode="adjustPan"
android:parentActivityName=".MainActivity" > android:parentActivityName=".MainActivity" >
</activity> </activity>
<activity <activity
android:name=".ContactActivity" android:name=".ContactActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:label="Contact" android:label="@string/contact"
android:parentActivityName=".ContactsActivity" > android:parentActivityName=".ContactsActivity" >
</activity> </activity>
<activity <activity
android:name=".ConfigActivity" android:name=".ConfigActivity"
android:label="Config" android:label="@string/configuration"
android:parentActivityName=".MainActivity" > android:parentActivityName=".MainActivity" >
</activity> </activity>
<activity <activity
android:name=".CallsActivity" android:name=".CallsActivity"
android:label="Call History" android:label="@string/calls"
android:parentActivityName=".MainActivity" > android:parentActivityName=".MainActivity" >
</activity> </activity>
<activity <activity
android:name=".ChatsActivity" android:name=".ChatsActivity"
android:label="Chat History" android:label="@string/chats"
android:parentActivityName=".MainActivity" > android:parentActivityName=".MainActivity" >
</activity> </activity>
<activity <activity
android:name=".ChatActivity" android:name=".ChatActivity"
android:label="Messages of a Chat" android:label="@string/chat"
android:parentActivityName=".ChatsActivity" > android:parentActivityName=".ChatsActivity" >
</activity> </activity>
<activity <activity
android:name=".AboutActivity" android:name=".AboutActivity"
android:label="About" android:label="@string/about"
android:parentActivityName=".MainActivity"> android:parentActivityName=".MainActivity">
</activity> </activity>

View File

@ -14,7 +14,7 @@ class AboutActivity : AppCompatActivity() {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_about) setContentView(R.layout.activity_about)
val aboutText = findViewById(R.id.aboutText) as TextView 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) BuildConfig.VERSION_NAME)
aboutText.setTextColor(Color.BLACK) aboutText.setTextColor(Color.BLACK)
} }

View File

@ -390,43 +390,47 @@ class AccountActivity : AppCompatActivity() {
fun onClick(v: View) { fun onClick(v: View) {
when (v) { when (v) {
findViewById(R.id.DisplayNameTitle) as TextView-> { 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 -> { findViewById(R.id.AuthUserTitle) as TextView -> {
Utils.alertView(this, "Authentication Username", Utils.alertView(this, getString(R.string.authentication_username),
getString(R.string.authUser)) getString(R.string.authentication_username_help))
} }
findViewById(R.id.AuthPassTitle) as TextView-> { findViewById(R.id.AuthPassTitle) as TextView-> {
Utils.alertView(this, "Authentication Password", Utils.alertView(this, getString(R.string.authentication_password),
getString(R.string.authPass)) getString(R.string.authentication_password_help))
} }
findViewById(R.id.OutboundProxyTitle) as TextView -> { findViewById(R.id.OutboundProxyTitle) as TextView -> {
Utils.alertView(this, "Outbound Proxies", Utils.alertView(this, getString(R.string.outbound_proxies),
getString(R.string.obProxies)) getString(R.string.outbound_proxies_help))
} }
findViewById(R.id.RegTitle) as TextView -> { findViewById(R.id.RegTitle) as TextView -> {
Utils.alertView(this, "Register", getString(R.string.register)) Utils.alertView(this, "Register", getString(R.string.register_help))
}
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))
} }
findViewById(R.id.AudioCodecsTitle) as TextView -> { 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 -> { findViewById(R.id.MediaEncTitle) as TextView -> {
Utils.alertView(this, "Media Encryption", Utils.alertView(this, getString(R.string.media_encryption),
getText(R.string.mediaEnc).toString()) getString(R.string.media_encryption_help))
} }
findViewById(R.id.VoicemailUriTitle) as TextView -> { findViewById(R.id.VoicemailUriTitle) as TextView -> {
Utils.alertView(this, "Voicemail URI", Utils.alertView(this, getString(R.string.voicemail_uri),
getText(R.string.vmUri).toString()) getString(R.string.voicemain_uri_help))
} }
findViewById(R.id.DefaultTitle) as TextView -> { findViewById(R.id.DefaultTitle) as TextView -> {
Utils.alertView(this, "Default Account", Utils.alertView(this, getString(R.string.default_account),
getText(R.string.defaultAccount).toString()) getText(R.string.default_account_help).toString())
} }
} }
} }

View File

@ -351,7 +351,7 @@ class BaresipService: Service() {
R.color.colorBaresip)) R.color.colorBaresip))
.setContentIntent(pi) .setContentIntent(pi)
.setAutoCancel(true) .setAutoCancel(true)
.setContentTitle("Incoming call from") .setContentTitle(getString(R.string.incoming_call_from))
.setContentText(caller) .setContentText(caller)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
nb.setVibrate(LongArray(0)) nb.setVibrate(LongArray(0))
@ -368,8 +368,10 @@ class BaresipService: Service() {
rejectIntent.putExtra("callp", callp) rejectIntent.putExtra("callp", callp)
val rejectPendingIntent = PendingIntent.getService(this, val rejectPendingIntent = PendingIntent.getService(this,
REJECT_REQ_CODE, rejectIntent, PendingIntent.FLAG_UPDATE_CURRENT) REJECT_REQ_CODE, rejectIntent, PendingIntent.FLAG_UPDATE_CURRENT)
nb.addAction(R.drawable.ic_stat, "Answer", answerPendingIntent) nb.addAction(R.drawable.ic_stat, getString(R.string.answer),
nb.addAction(R.drawable.ic_stat, "Reject", rejectPendingIntent) answerPendingIntent)
nb.addAction(R.drawable.ic_stat, getString(R.string.reject),
rejectPendingIntent)
nm.notify(CALL_NOTIFICATION_ID, nb.build()) nm.notify(CALL_NOTIFICATION_ID, nb.build())
return return
} }
@ -436,7 +438,7 @@ class BaresipService: Service() {
.setContentIntent(pi) .setContentIntent(pi)
.setDefaults(Notification.DEFAULT_SOUND) .setDefaults(Notification.DEFAULT_SOUND)
.setAutoCancel(true) .setAutoCancel(true)
.setContentTitle("Call transfer request to") .setContentTitle(getString(R.string.transfer_request))
.setContentText(target) .setContentText(target)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
nb.setVibrate(LongArray(0)) nb.setVibrate(LongArray(0))
@ -455,8 +457,10 @@ class BaresipService: Service() {
denyIntent.putExtra("callp", callp) denyIntent.putExtra("callp", callp)
val denyPendingIntent = PendingIntent.getService(this, val denyPendingIntent = PendingIntent.getService(this,
DENY_REQ_CODE, denyIntent, PendingIntent.FLAG_UPDATE_CURRENT) DENY_REQ_CODE, denyIntent, PendingIntent.FLAG_UPDATE_CURRENT)
nb.addAction(R.drawable.ic_stat, "Accept", acceptPendingIntent) nb.addAction(R.drawable.ic_stat, getString(R.string.accept),
nb.addAction(R.drawable.ic_stat, "Deny", denyPendingIntent) acceptPendingIntent)
nb.addAction(R.drawable.ic_stat, getString(R.string.deny),
denyPendingIntent)
nm.notify(TRANSFER_NOTIFICATION_ID, nb.build()) nm.notify(TRANSFER_NOTIFICATION_ID, nb.build())
return return
} }
@ -541,7 +545,7 @@ class BaresipService: Service() {
.setContentIntent(pi) .setContentIntent(pi)
.setSound(Settings.System.DEFAULT_NOTIFICATION_URI) .setSound(Settings.System.DEFAULT_NOTIFICATION_URI)
.setAutoCancel(true) .setAutoCancel(true)
.setContentTitle("Message from $sender") .setContentTitle(getString(R.string.message_from) + " " + sender)
.setContentText(text) .setContentText(text)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
nb.setVibrate(LongArray(0)) nb.setVibrate(LongArray(0))

View File

@ -59,10 +59,10 @@ class ChatActivity : AppCompatActivity() {
else else
chatPeer = chatPeer.substring(4) chatPeer = chatPeer.substring(4)
} }
setTitle("Chat with $chatPeer") setTitle("${getString(R.string.chat_with)} $chatPeer")
val headerView = findViewById(R.id.account) as TextView val headerView = findViewById(R.id.account) as TextView
val headerText = "Account ${aor.substringAfter(":")}" val headerText = "${getString(R.string.account)} ${aor.substringAfter(":")}"
headerView.text = headerText headerView.text = headerText
listView = findViewById(R.id.messages) as ListView listView = findViewById(R.id.messages) as ListView
@ -99,16 +99,17 @@ class ChatActivity : AppCompatActivity() {
} }
} }
val builder = AlertDialog.Builder(this@ChatActivity, R.style.Theme_AppCompat) val builder = AlertDialog.Builder(this@ChatActivity, R.style.Theme_AppCompat)
if (chatPeer.contains("@") || Utils.checkTelNo(chatPeer)) if (ContactsActivity.contactName(peerUri) == peerUri)
builder.setMessage("Do you want to delete message or add peer $chatPeer to contacts?") builder.setMessage(String.format(getText(R.string.long_message_question).toString(),
.setPositiveButton("Cancel", dialogClickListener) chatPeer))
.setNegativeButton("Delete Message", dialogClickListener) .setPositiveButton(getString(R.string.cancel), dialogClickListener)
.setNeutralButton("Add Contact", dialogClickListener) .setNegativeButton(getString(R.string.delete_message), dialogClickListener)
.setNeutralButton(getString(R.string.add_contact), dialogClickListener)
.show() .show()
else else
builder.setMessage("Do you want to delete message?") builder.setMessage(getText(R.string.short_message_question))
.setPositiveButton("Cancel", dialogClickListener) .setPositiveButton(getString(R.string.cancel), dialogClickListener)
.setNegativeButton("Delete Message", dialogClickListener) .setNegativeButton(getString(R.string.delete_message), dialogClickListener)
.show() .show()
true true
} }
@ -133,10 +134,10 @@ class ChatActivity : AppCompatActivity() {
Message.add(msg) Message.add(msg)
chatMessages.add(msg) chatMessages.add(msg)
if (Api.message_send(ua.uap, peerUri, msgText, time.toString()) != 0) { 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() Toast.LENGTH_SHORT).show()
msg.direction = R.drawable.arrow_up_red msg.direction = R.drawable.arrow_up_red
msg.responseReason = "Sending of message failed" msg.responseReason = getString(R.string.message_failed)
} else { } else {
newMessage.text.clear() newMessage.text.clear()
BaresipService.chatTexts.remove("$aor::$peerUri") BaresipService.chatTexts.remove("$aor::$peerUri")

View File

@ -218,31 +218,39 @@ class ConfigActivity : AppCompatActivity() {
fun onClick(v: View) { fun onClick(v: View) {
when (v) { when (v) {
findViewById(R.id.AutoStartTitle) as TextView-> { 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-> { 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-> { 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 -> { 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-> { 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-> { 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-> { 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-> { 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-> { 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))
} }
} }
} }

View File

@ -208,18 +208,18 @@ class MainActivity : AppCompatActivity() {
securityButton.setOnClickListener { securityButton.setOnClickListener {
when (securityButton.tag) { when (securityButton.tag) {
"red" -> { "red" -> {
Utils.alertView(this, "Alert", "This call is NOT secure!") Utils.alertView(this, getString(R.string.alert),
getString(R.string.call_not_secure))
} }
"yellow" -> { "yellow" -> {
Utils.alertView(this, "Alert", Utils.alertView(this, getString(R.string.alert),
"This call is SECURE, but peer is NOT verified!") getString(R.string.peer_not_verified))
} }
"green" -> { "green" -> {
val unverifyDialog = AlertDialog.Builder(this) val unverifyDialog = AlertDialog.Builder(this)
unverifyDialog.setTitle("Info") unverifyDialog.setTitle(getString(R.string.info))
unverifyDialog.setMessage("This call is SECURE and peer is VERIFIED! " + unverifyDialog.setMessage(getString(R.string.call_is_secure))
"Do you want to unverify the peer?") unverifyDialog.setPositiveButton(getString(R.string.unverify)) { dialog, _ ->
unverifyDialog.setPositiveButton("Unverify") { dialog, _ ->
val calls = Call.uaCalls(UserAgent.uas()[aorSpinner.selectedItemPosition], val calls = Call.uaCalls(UserAgent.uas()[aorSpinner.selectedItemPosition],
"") "")
if (calls.size > 0) { if (calls.size > 0) {
@ -233,7 +233,7 @@ class MainActivity : AppCompatActivity() {
} }
dialog.dismiss() dialog.dismiss()
} }
unverifyDialog.setNegativeButton("No") { dialog, _ -> unverifyDialog.setNegativeButton(getString(R.string.no)) { dialog, _ ->
dialog.dismiss() dialog.dismiss()
} }
unverifyDialog.create().show() unverifyDialog.create().show()
@ -257,7 +257,8 @@ class MainActivity : AppCompatActivity() {
} }
} }
if (!Utils.checkSipUri(uri)) 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 else
call(ua, uri, "outgoing") call(ua, uri, "outgoing")
} else { } else {
@ -328,11 +329,11 @@ class MainActivity : AppCompatActivity() {
val rate = status.split('=')[1] val rate = status.split('=')[1]
val txCodec = codecs.split(',')[0].split("/") val txCodec = codecs.split(',')[0].split("/")
val rxCodec = codecs.split(',')[1].split("/") val rxCodec = codecs.split(',')[1].split("/")
Utils.alertView(this, "Call Info", Utils.alertView(this, getString(R.string.call_info),
"Duration: $duration\n" + "${getString(R.string.duration)}: $duration\n" +
"Codecs: ${txCodec[0]} ch ${txCodec[2]}/" + "${getString(R.string.codecs)}: ${txCodec[0]} ch ${txCodec[2]}/" +
"${rxCodec[0]} ch ${rxCodec[2]}\n" + "${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, val builder = AlertDialog.Builder(this@MainActivity,
R.style.Theme_AppCompat) R.style.Theme_AppCompat)
builder.setTitle("Voicemail Messages") builder.setTitle(getString(R.string.voicemail_messages))
builder.setMessage(acc.vmMessage()) builder.setMessage(acc.vmMessage())
.setPositiveButton("Cancel", dialogClickListener) .setPositiveButton(getString(R.string.cancel), dialogClickListener)
.setNegativeButton("Check", dialogClickListener) .setNegativeButton(getString(R.string.check), dialogClickListener)
.show() .show()
} }
} }
@ -447,7 +448,7 @@ class MainActivity : AppCompatActivity() {
when (action) { when (action) {
"call" -> { "call" -> {
if (!Call.calls().isEmpty()) { 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() Toast.LENGTH_SHORT).show()
return return
} }
@ -561,9 +562,9 @@ class MainActivity : AppCompatActivity() {
Log.d("Baresip", "Handling service event 'stopped' with param ${params[0]}") Log.d("Baresip", "Handling service event 'stopped' with param ${params[0]}")
if (params[0] != "") { if (params[0] != "") {
val alertDialog = AlertDialog.Builder(this).create() val alertDialog = AlertDialog.Builder(this).create()
alertDialog.setTitle("Notice") alertDialog.setTitle(getString(R.string.notice))
alertDialog.setMessage("Baresip failed to start! Listen Address was reset. Restart baresip.") alertDialog.setMessage(getString(R.string.start_failed))
alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK" alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, getString(R.string.ok)
) { dialog, _ -> ) { dialog, _ ->
dialog.dismiss() dialog.dismiss()
quitTimer.cancel() quitTimer.cancel()
@ -601,7 +602,8 @@ class MainActivity : AppCompatActivity() {
"registering failed" -> { "registering failed" -> {
uaAdapter.notifyDataSetChanged() uaAdapter.notifyDataSetChanged()
Toast.makeText(applicationContext, Toast.makeText(applicationContext,
"Registering of $aor failed: ${ev[1]}", String.format(getText(R.string.registering_failed).toString(),
aor) + ": ${ev[1]}",
Toast.LENGTH_LONG).show() Toast.LENGTH_LONG).show()
} }
"call ringing" -> { "call ringing" -> {
@ -618,7 +620,7 @@ class MainActivity : AppCompatActivity() {
Manifest.permission.RECORD_AUDIO) == Manifest.permission.RECORD_AUDIO) ==
PackageManager.PERMISSION_DENIED) { PackageManager.PERMISSION_DENIED) {
Toast.makeText(applicationContext, Toast.makeText(applicationContext,
"You have not granted microphone permission.", getString(R.string.no_microphone_permission),
Toast.LENGTH_SHORT).show() Toast.LENGTH_SHORT).show()
Api.ua_hangup(uap, callp, 486, "Busy Here") Api.ua_hangup(uap, callp, 486, "Busy Here")
return return
@ -633,7 +635,7 @@ class MainActivity : AppCompatActivity() {
(ua != UserAgent.uas()[aorSpinner.selectedItemPosition])) { (ua != UserAgent.uas()[aorSpinner.selectedItemPosition])) {
aorSpinner.setSelection(account_index) aorSpinner.setSelection(account_index)
} else { } else {
callTitle.text = "Incoming call from ..." callTitle.text = getString(R.string.incoming_call_from_dots)
callUri.setAdapter(null) callUri.setAdapter(null)
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI), callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI),
Utils.aorDomain(ua.account.aor))) Utils.aorDomain(ua.account.aor)))
@ -665,9 +667,9 @@ class MainActivity : AppCompatActivity() {
setVolumeControlStream(AudioManager.STREAM_VOICE_CALL) setVolumeControlStream(AudioManager.STREAM_VOICE_CALL)
if (ua == UserAgent.uas()[aorSpinner.selectedItemPosition]) { if (ua == UserAgent.uas()[aorSpinner.selectedItemPosition]) {
if (call.dir == "in") if (call.dir == "in")
callTitle.text = "Incoming call from ..." callTitle.text = getString(R.string.incoming_call_from_dots)
else else
callTitle.text = "Outgoing call to ..." callTitle.text = getString(R.string.outgoing_call_to_dots)
if (acc.mediaEnc == "") { if (acc.mediaEnc == "") {
securityButton.visibility = View.INVISIBLE securityButton.visibility = View.INVISIBLE
} else { } else {
@ -683,7 +685,7 @@ class MainActivity : AppCompatActivity() {
holdButton.setImageResource(R.drawable.pause) holdButton.setImageResource(R.drawable.pause)
holdButton.visibility = View.VISIBLE holdButton.visibility = View.VISIBLE
dtmf.setText("") dtmf.setText("")
dtmf.hint = "DTMF" dtmf.hint = getString(R.string.dtmf)
dtmf.visibility = View.VISIBLE dtmf.visibility = View.VISIBLE
dtmf.requestFocus() dtmf.requestFocus()
if (dtmfWatcher != null) dtmf.removeTextChangedListener(dtmfWatcher) if (dtmfWatcher != null) dtmf.removeTextChangedListener(dtmfWatcher)
@ -700,9 +702,9 @@ class MainActivity : AppCompatActivity() {
return return
} }
val verifyDialog = AlertDialog.Builder(this@MainActivity) val verifyDialog = AlertDialog.Builder(this@MainActivity)
verifyDialog.setTitle("Verify") verifyDialog.setTitle(getString(R.string.verify))
verifyDialog.setMessage("Do you want to verify SAS <${ev[1]}> <${ev[2]}>?") verifyDialog.setMessage("${getString(R.string.verify_sas)} <${ev[1]}> <${ev[2]}>?")
verifyDialog.setPositiveButton("Yes") { dialog, _ -> verifyDialog.setPositiveButton(getString(R.string.yes)) { dialog, _ ->
val security: Int val security: Int
if (Api.cmd_exec("zrtp_verify ${ev[3]}") != 0) { if (Api.cmd_exec("zrtp_verify ${ev[3]}") != 0) {
Log.e("Baresip", "Command 'zrtp_verify ${ev[3]}' failed") Log.e("Baresip", "Command 'zrtp_verify ${ev[3]}' failed")
@ -719,7 +721,7 @@ class MainActivity : AppCompatActivity() {
dialog.dismiss() dialog.dismiss()
} }
} }
verifyDialog.setNegativeButton("No") { dialog, _ -> verifyDialog.setNegativeButton(getString(R.string.no)) { dialog, _ ->
call.security = R.drawable.box_yellow call.security = R.drawable.box_yellow
call.zid = ev[3] call.zid = ev[3]
if (ua == UserAgent.uas()[aorSpinner.selectedItemPosition]) { if (ua == UserAgent.uas()[aorSpinner.selectedItemPosition]) {
@ -758,15 +760,15 @@ class MainActivity : AppCompatActivity() {
val transferDialog = AlertDialog.Builder(this) val transferDialog = AlertDialog.Builder(this)
val target = Utils.friendlyUri(ContactsActivity.contactName(ev[1]), val target = Utils.friendlyUri(ContactsActivity.contactName(ev[1]),
Utils.aorDomain(aor)) Utils.aorDomain(aor))
transferDialog.setMessage("Do you accept to transfer call to $target?") transferDialog.setMessage("${getString(R.string.transfer_query)} $target?")
transferDialog.setPositiveButton("Yes") { dialog, _ -> transferDialog.setPositiveButton(getString(R.string.yes)) { dialog, _ ->
if (call in Call.calls()) if (call in Call.calls())
Api.ua_hangup(uap, callp, 0, "") Api.ua_hangup(uap, callp, 0, "")
call(ua, ev[1], "transferring") call(ua, ev[1], "transferring")
showCall(ua) showCall(ua)
dialog.dismiss() dialog.dismiss()
} }
transferDialog.setNegativeButton("No") { dialog, _ -> transferDialog.setNegativeButton(getString(R.string.no)) { dialog, _ ->
if (call in Call.calls()) if (call in Call.calls())
Api.call_notify_sipfrag(callp, 603, "Decline") Api.call_notify_sipfrag(callp, 603, "Decline")
dialog.dismiss() dialog.dismiss()
@ -795,10 +797,12 @@ class MainActivity : AppCompatActivity() {
val param = ev[1].trim() val param = ev[1].trim()
if ((param != "") && (Call.uaCalls(ua, "").size == 0)) { if ((param != "") && (Call.uaCalls(ua, "").size == 0)) {
if (param.get(0).isDigit()) if (param.get(0).isDigit())
Toast.makeText(applicationContext, "Call failed: $param", Toast.makeText(applicationContext,
"${getString(R.string.call_failed)}: $param",
Toast.LENGTH_LONG).show() Toast.LENGTH_LONG).show()
else else
Toast.makeText(applicationContext, "Call closed: $param", Toast.makeText(applicationContext,
"${getString(R.string.call_closed)}: $param",
Toast.LENGTH_LONG).show() Toast.LENGTH_LONG).show()
} }
} }
@ -959,8 +963,8 @@ class MainActivity : AppCompatActivity() {
CONFIG_CODE -> { CONFIG_CODE -> {
if ((resultCode == RESULT_OK) && if ((resultCode == RESULT_OK) &&
(data!!.getBooleanExtra("restart", true))) (data!!.getBooleanExtra("restart", true)))
Utils.alertView(this, "Notice", Utils.alertView(this, getString(R.string.notice),
"You need to restart baresip in order to activate the new config!") getString(R.string.restart_needed))
if (resultCode == RESULT_CANCELED) if (resultCode == RESULT_CANCELED)
Log.d("Baresip", "Config canceled") Log.d("Baresip", "Config canceled")
} }
@ -1000,7 +1004,7 @@ class MainActivity : AppCompatActivity() {
if (ContextCompat.checkSelfPermission(applicationContext, Manifest.permission.RECORD_AUDIO) if (ContextCompat.checkSelfPermission(applicationContext, Manifest.permission.RECORD_AUDIO)
== PackageManager.PERMISSION_DENIED) { == PackageManager.PERMISSION_DENIED) {
Toast.makeText(applicationContext, Toast.makeText(applicationContext,
"You have not granted microphone permission.", Toast.LENGTH_SHORT).show() getString(R.string.no_microphone_permission), Toast.LENGTH_SHORT).show()
return return
} }
if (ua != UserAgent.uas()[aorSpinner.selectedItemPosition]) if (ua != UserAgent.uas()[aorSpinner.selectedItemPosition])
@ -1073,9 +1077,9 @@ class MainActivity : AppCompatActivity() {
private fun showCall(ua: UserAgent) { private fun showCall(ua: UserAgent) {
if (Call.uaCalls(ua, "").size == 0) { if (Call.uaCalls(ua, "").size == 0) {
callTitle.text = "Outgoing call to ..." callTitle.text = getString(R.string.outgoing_call_to_dots)
callUri.text.clear() callUri.text.clear()
callUri.hint = "Callee" callUri.hint = getString(R.string.callee)
callUri.isFocusable = true callUri.isFocusable = true
callUri.isFocusableInTouchMode = true callUri.isFocusableInTouchMode = true
imm.hideSoftInputFromWindow(callUri.windowToken, 0) imm.hideSoftInputFromWindow(callUri.windowToken, 0)
@ -1096,11 +1100,11 @@ class MainActivity : AppCompatActivity() {
if (callsOut.size > 0) { if (callsOut.size > 0) {
call = callsOut[callsOut.size - 1] call = callsOut[callsOut.size - 1]
if (call.status == "transferring") if (call.status == "transferring")
callTitle.text = "Transferring call to ..." callTitle.text = getString(R.string.transferring_call_to_dots)
else else
callTitle.text = "Outgoing call to ..." callTitle.text = getString(R.string.outgoing_call_to_dots)
} else { } else {
callTitle.text = "Incoming call from ..." callTitle.text = getString(R.string.incoming_call_from_dots)
call = callsIn[callsIn.size - 1] call = callsIn[callsIn.size - 1]
} }
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI), callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI),

View File

@ -23,13 +23,13 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Display Name" > android:text="@string/display_name" >
</TextView> </TextView>
<EditText <EditText
android:id="@+id/DisplayName" android:id="@+id/DisplayName"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="Your Name" android:hint="@string/your_name"
android:inputType="textPersonName|textCapWords" android:inputType="textPersonName|textCapWords"
android:textSize="18sp" android:textSize="18sp"
android:layout_width="fill_parent"> android:layout_width="fill_parent">
@ -42,13 +42,13 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Authentication Username" > android:text="@string/authentication_username" >
</TextView> </TextView>
<EditText <EditText
android:id="@+id/AuthUser" android:id="@+id/AuthUser"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="User ID" android:hint="@string/user_id"
android:textSize="18sp" android:textSize="18sp"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:layout_width="fill_parent"> android:layout_width="fill_parent">
@ -61,13 +61,13 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Authentication Password" > android:text="@string/authentication_password" >
</TextView> </TextView>
<EditText <EditText
android:id="@+id/AuthPass" android:id="@+id/AuthPass"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="Password" android:hint="@string/password"
android:textSize="18sp" android:textSize="18sp"
android:inputType="textPassword" android:inputType="textPassword"
android:layout_width="fill_parent"> android:layout_width="fill_parent">
@ -80,13 +80,13 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Outbound Proxies" > android:text="@string/outbound_proxies" >
</TextView> </TextView>
<EditText <EditText
android:id="@+id/Outbound1" android:id="@+id/Outbound1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="SIP URI of Proxy Server" android:hint="@string/sip_uri_of_proxy_server"
android:textSize="18sp" android:textSize="18sp"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:layout_width="fill_parent" > android:layout_width="fill_parent" >
@ -95,7 +95,7 @@
<EditText <EditText
android:id="@+id/Outbound2" android:id="@+id/Outbound2"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="SIP URI of another Proxy Server" android:hint="@string/sip_uri_of_another_proxy_server"
android:textSize="18sp" android:textSize="18sp"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:layout_width="fill_parent" > android:layout_width="fill_parent" >
@ -113,7 +113,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Register" > android:text="@string/register" >
</TextView> </TextView>
<CheckBox <CheckBox
android:id="@+id/Register" android:id="@+id/Register"
@ -132,7 +132,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Audio Codecs" > android:text="@string/audio_codecs" >
</TextView> </TextView>
<LinearLayout <LinearLayout
@ -150,7 +150,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Media NAT Traversal" > android:text="@string/media_nat" >
</TextView> </TextView>
<Spinner <Spinner
@ -168,7 +168,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="STUN Server" > android:text="@string/stun_server" >
</TextView> </TextView>
<EditText <EditText
@ -190,7 +190,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Media Encryption" > android:text="@string/media_encryption" >
</TextView> </TextView>
<Spinner <Spinner
@ -208,13 +208,13 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Voicemail URI" > android:text="@string/voicemail_uri" >
</TextView> </TextView>
<EditText <EditText
android:id="@+id/voicemailUri" android:id="@+id/voicemailUri"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="SIP URI" android:hint="@string/sip_uri"
android:textSize="18sp" android:textSize="18sp"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:layout_width="fill_parent"> android:layout_width="fill_parent">
@ -232,7 +232,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Default Account" > android:text="@string/default_account" >
</TextView> </TextView>
<CheckBox <CheckBox
android:id="@+id/Default" android:id="@+id/Default"

View File

@ -29,7 +29,7 @@
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_toLeftOf="@+id/addAccount" android:layout_toLeftOf="@+id/addAccount"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:hint="SIP URI user@domain" > android:hint="@string/sip_uri_user_domain" >
</EditText> </EditText>
<ImageButton <ImageButton

View File

@ -39,7 +39,7 @@
android:importantForAutofill="no" android:importantForAutofill="no"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_toStartOf="@id/sendButton" android:layout_toStartOf="@id/sendButton"
android:hint="New message" > android:hint="@string/new_message" >
</EditText> </EditText>
<ImageButton <ImageButton

View File

@ -41,7 +41,7 @@
android:layout_toStartOf="@+id/plusButton" android:layout_toStartOf="@+id/plusButton"
android:textSize="18sp" android:textSize="18sp"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:hint="New Chat Peer" > android:hint="@string/new_chat_peer" >
</AutoCompleteTextView> </AutoCompleteTextView>
<ImageButton <ImageButton

View File

@ -29,7 +29,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Start Automatically" > android:text="@string/start_automatically" >
</TextView> </TextView>
<CheckBox <CheckBox
android:id="@+id/AutoStart" android:id="@+id/AutoStart"
@ -48,7 +48,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:onClick="onClick" android:onClick="onClick"
android:text="Listen Address" android:text="@string/listen_address"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="18sp" > android:textSize="18sp" >
</TextView> </TextView>
@ -60,7 +60,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:textSize="18sp" android:textSize="18sp"
android:hint="0.0.0.0:5060" > android:hint="@string/_0_0_0_0_5060" >
</EditText> </EditText>
<RelativeLayout <RelativeLayout
@ -77,7 +77,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Prefer IPv6" > android:text="@string/prefer_ipv6" >
</TextView> </TextView>
<CheckBox <CheckBox
android:id="@+id/PreferIPv6" android:id="@+id/PreferIPv6"
@ -96,7 +96,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:onClick="onClick" android:onClick="onClick"
android:text="DNS Servers" android:text="@string/dns_servers"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="18sp"> android:textSize="18sp">
</TextView> </TextView>
@ -124,7 +124,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Opus Bit Rate" > android:text="@string/opus_bit_rate" >
</TextView> </TextView>
<EditText <EditText
android:id="@+id/OpusBitRate" android:id="@+id/OpusBitRate"
@ -153,7 +153,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="ICE Lite Mode" > android:text="@string/ice_lite_mode" >
</TextView> </TextView>
<CheckBox <CheckBox
android:id="@+id/IceLite" android:id="@+id/IceLite"
@ -180,7 +180,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Default Call Volume" > android:text="@string/default_call_volume" >
</TextView> </TextView>
<Spinner <Spinner
android:id="@+id/VolumeSpinner" android:id="@+id/VolumeSpinner"
@ -207,7 +207,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Debug" > android:text="@string/debug" >
</TextView> </TextView>
<CheckBox <CheckBox
android:id="@+id/Debug" android:id="@+id/Debug"
@ -234,7 +234,7 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:onClick="onClick" android:onClick="onClick"
android:text="Reset to Factory Default" > android:text="@string/reset_config" >
</TextView> </TextView>
<CheckBox <CheckBox
android:id="@+id/Reset" android:id="@+id/Reset"

View File

@ -16,7 +16,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:text="Contact Name" > android:text="@string/contact_name" >
</TextView> </TextView>
<EditText <EditText
@ -34,13 +34,13 @@
android:textSize="18sp" android:textSize="18sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:paddingTop="10dp" android:paddingTop="10dp"
android:text="SIP URI" > android:text="@string/sip_uri" >
</TextView> </TextView>
<EditText <EditText
android:id="@+id/Uri" android:id="@+id/Uri"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="SIP URI" android:hint="@string/sip_uri"
android:inputType="textUri" android:inputType="textUri"
android:textSize="18sp" android:textSize="18sp"
android:layout_width="fill_parent"> android:layout_width="fill_parent">

View File

@ -39,7 +39,7 @@
android:paddingStart="3dp" android:paddingStart="3dp"
android:textSize="20sp" android:textSize="20sp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:text="Outgoing call to ..." > android:text="@string/outgoing_call_to_dots" >
</TextView> </TextView>
<LinearLayout <LinearLayout
@ -56,7 +56,7 @@
android:layout_weight = "1" android:layout_weight = "1"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:textSize="20sp" android:textSize="20sp"
android:hint="Callee" > android:hint="@string/callee" >
<!-- <requestFocus /> --> <!-- <requestFocus /> -->
</AutoCompleteTextView> </AutoCompleteTextView>
@ -140,7 +140,7 @@
android:layout_marginStart="140dp" android:layout_marginStart="140dp"
android:inputType="phone" android:inputType="phone"
android:textSize="20sp" android:textSize="20sp"
android:hint="DTMF" android:hint="@string/dtmf"
android:visibility="invisible" > android:visibility="invisible" >
</EditText> </EditText>

View File

@ -26,7 +26,7 @@
android:layout_gravity="center" android:layout_gravity="center"
android:textSize="15dp" android:textSize="15dp"
android:textColor="#000000" android:textColor="#000000"
android:text="Baresip " android:text="@string/app_name"
style = "@android:style/TextAppearance.Medium" /> style = "@android:style/TextAppearance.Medium" />
</LinearLayout> </LinearLayout>
@ -49,7 +49,7 @@
android:layout_marginBottom="14dp" android:layout_marginBottom="14dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_gravity="center" android:layout_gravity="center"
android:text="Answer" /> android:text="@string/answer" />
<Button android:id="@+id/rejectButton" <Button android:id="@+id/rejectButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -60,6 +60,6 @@
android:layout_marginBottom="14dp" android:layout_marginBottom="14dp"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_gravity="center" android:layout_gravity="center"
android:text="Reject" /> android:text="@string/reject" />
</RelativeLayout> </RelativeLayout>

View File

@ -12,7 +12,7 @@
android:id="@+id/password" android:id="@+id/password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="Password" android:hint="@string/password"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:inputType="textPassword" /> android:inputType="textPassword" />

View File

@ -19,7 +19,7 @@
android:layout_gravity="center" android:layout_gravity="center"
android:textSize="15dp" android:textSize="15dp"
android:textColor="#000000" android:textColor="#000000"
android:text="Baresip " android:text="@string/app_name"
style = "@android:style/TextAppearance.Medium" /> style = "@android:style/TextAppearance.Medium" />
<ImageView android:id="@+id/status0" <ImageView android:id="@+id/status0"
@ -52,7 +52,7 @@
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginBottom="14dp" android:layout_marginBottom="14dp"
android:paddingLeft="5dp" android:paddingLeft="5dp"
android:text="..." android:text="@string/dots"
android:textColor="#000000" android:textColor="#000000"
style = "@android:style/TextAppearance.Medium" /> style = "@android:style/TextAppearance.Medium" />

View File

@ -1,9 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/export_accounts" <item android:id="@+id/export_accounts"
android:title="Export" /> android:title="@string/export_accounts" />
<item android:id="@+id/import_accounts" <item android:id="@+id/import_accounts"
android:title="Import" /> android:title="@string/import_accounts" />
</menu> </menu>

View File

@ -1,9 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/export_contacts" <item android:id="@+id/export_contacts"
android:title="Export" /> android:title="@string/export_contacts" />
<item android:id="@+id/import_contacts" <item android:id="@+id/import_contacts"
android:title="Import" /> android:title="@string/import_contacts" />
</menu> </menu>

View File

@ -1,15 +1,15 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/config" <item android:id="@+id/config"
android:title="Config" /> android:title="@string/configuration" />
<item android:id="@+id/accounts" <item android:id="@+id/accounts"
android:title="Accounts" /> android:title="@string/accounts" />
<item android:id="@+id/about" <item android:id="@+id/about"
android:title="About" /> android:title="@string/about" />
<item android:id="@+id/quit" <item android:id="@+id/quit"
android:title="Quit" /> android:title="@string/quit" />
</menu> </menu>

View File

@ -1,23 +1,34 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">baresip</string> <string name="app_name">baresip</string>
<string name="aboutText">
<b>Baresip based Android application</b>\n\n <!-- About Activity -->
<string name="about_title">About baresip</string>
<string name="about_text">
<b>Baresip library based Android application</b>\n\n
Juha Heinanen jh@tutpro.com\n\n Juha Heinanen jh@tutpro.com\n\n
Version %1$s\n\n Version %1$s\n\n
<b>Usage Hints</b>\n\n <b>Usage Hints</b>\n\n
&#8226; Check that config default values meet your needs (click item titles for help).\n &#8226; Check that configuration default values meet your needs (click item titles for help).\n
&#8226; Then create one or more accounts (again click item titles for help).\n &#8226; Then create one or more accounts (again click item titles for help).\n
&#8226; Peers of calls and messages can be added to contacts by long clicks.\n &#8226; Peers of calls and messages can be added to contacts by long clicks.\n
&#8226; Long clicks can also be used to remove calls, chats, messages, and contacts.\n &#8226; Long clicks can also be used to remove calls, chats, messages, and contacts.\n
&#8226; Call click when callee has not been given can be used for re-dial.\n &#8226; Call click when callee has not been given can be used for re-dial.\n
&#8226; If you cannot hear the other party of a call, try to increase Media volume.\n &#8226; If you cannot hear the other party of a call, try to increase Media volume.\n
</string> </string>
<string name="noAccounts">No accounts</string>
<string name="dispName">Name (if any) used in From URI of outbound requests.</string> <!-- Account Activity -->
<string name="authUser">Authentication username if required by outbound proxy.</string> <string name="account">Account</string>
<string name="authPass">Authentication password if required by outbound proxy.</string> <string name="display_name">Display Name</string>
<string name="obProxies">SIP URI of one or two proxies that must be used when sending requests. <string name="your_name">Your Name</string>
<string name="display_name_help">Name (if any) used in From URI of outbound requests.</string>
<string name="authentication_username">Authentication Username</string>
<string name="authentication_username_help">Authentication username if required by outbound proxy.</string>
<string name="authentication_password">Authentication Password</string>
<string name="authentication_password_help">Authentication password if required by outbound proxy.</string>
<string name="outbound_proxies">Outbound Proxies</string>
<string name="outbound_proxies_help">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 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 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 DNS NAPTR/SRV/A record lookup of callee URI hostpart. If hostpart of SIP URI is an IPv6
@ -25,19 +36,26 @@
&#8226; sip:foo.com:5060;transport=tls\n &#8226; sip:foo.com:5060;transport=tls\n
&#8226; sip:[2001:67c:223:777::10]:5060;transport=tcp &#8226; sip:[2001:67c:223:777::10]:5060;transport=tcp
</string> </string>
<string name="register">If checked, registration is enabled and REGISTER requests are sent at <string name="sip_uri_of_proxy_server">SIP URI of Proxy Server</string>
<string name="sip_uri_of_another_proxy_server">SIP URI of another Proxy Server</string>
<string name="register">Register</string>
<string name="register_help">If checked, registration is enabled and REGISTER requests are sent at
12 minute intervals. 12 minute intervals.
</string> </string>
<string name="mediaNat">Selects media NAT traversal protocol (if any). Possible choices are STUN <string name="audio_codecs">Audio Codecs</string>
<string name="audio_codecs_help">List of supported audio codecs in priority order.</string>
<string name="media_nat">Media NAT Traversal</string>
<string name="media_nat_help">Selects media NAT traversal protocol (if any). Possible choices are STUN
(Session Traversal Utilities for NAT, RFC 5389) and ICE (Interactive Connectivity (Session Traversal Utilities for NAT, RFC 5389) and ICE (Interactive Connectivity
Establishment, RFC 5245). Establishment, RFC 5245).
</string> </string>
<string name="stunServer">A STUN Server of form host[:port]. <string name="stun_server">STUN Server</string>
<string name="stun_server_help">A STUN Server of form host[:port].
Factory default value is \'stun.l.google.com:19302\', pointing to public Google STUN server. Factory default value is \'stun.l.google.com:19302\', pointing to public Google STUN server.
Username and password are currently not supported. Username and password are currently not supported.
</string> </string>
<string name="auCodecs">List of supported audio codecs in priority order.</string> <string name="media_encryption">Media Encryption</string>
<string name="mediaEnc">Selects media transport encryption protocol.\n <string name="media_encryption_help">Selects media transport encryption protocol.\n
&#8226; ZRTP (recommended) means that ZRTP end-to-end media encryption negotiation is tried after &#8226; ZRTP (recommended) means that ZRTP end-to-end media encryption negotiation is tried after
the call has been established.\n the call has been established.\n
&#8226; DTLS-SRTPF means that UDP/TLS/RTP/SAVPF is offered in outgoing call and that RTP/SAVP, &#8226; DTLS-SRTPF means that UDP/TLS/RTP/SAVPF is offered in outgoing call and that RTP/SAVP,
@ -49,27 +67,130 @@
&#8226; None means that media encryption is not supported and that media transport protocol &#8226; None means that media encryption is not supported and that media transport protocol
thus is RTP/AVP. thus is RTP/AVP.
</string> </string>
<string name="vmUri">SIP URI for checking of voicemail messages. If left empty, voicemail <string name="voicemail_uri">Voicemail URI</string>
<string name="voicemain_uri_help">SIP URI for checking of voicemail messages. If left empty, voicemail
messages (Message Waiting Indications) are not subscribed to. messages (Message Waiting Indications) are not subscribed to.
</string>> </string>
<string name="defaultAccount">If checked, this account is selected when baresip is started. <string name="default_account">Default Account</string>
</string>> <string name="default_account_help">If checked, this account is selected when baresip is started.
<string name="autoStart">If checked, baresip starts automatically after device (re)start.</string> </string>
<string name="listenAddress">IP address and port of form \'address:port\' at which baresip listens
<!-- Accounts Activity -->
<string name="accounts">Accounts</string>
<string name="sip_uri_user_domain">SIP URI user@domain</string>
<string name="export_accounts">Export</string>
<string name="import_accounts">Import</string>
<!-- Baresip Service -->
<string name="answer">Answer</string>
<string name="reject">Reject</string>
<string name="incoming_call_from">Incoming call from</string>
<string name="transfer_request">Call transfer request to</string>
<string name="message_from">Message from</string>
<!-- Calls Activity -->
<string name="calls">Call History</string>
<!-- Chat Activity -->
<string name="chat">Chat Messages</string>
<string name="chat_with">Chat with</string>
<string name="new_message">New message</string>
<string name="long_message_question">Do you want to delete message or add peer %1$s to contacts?</string>
<string name="short_message_question">Do you want to delete message?</string>
<string name="delete_message">Delete Message</string>
<string name="add_contact">Add Contact</string>
<string name="message_failed">Sending of message failed</string>
<!-- Chats Activity -->
<string name="chats">Chat History</string>
<string name="new_chat_peer">New Chat Peer</string>
<!-- Config Activity -->
<string name="configuration">Configuration</string>
<string name="start_automatically">Start Automatically</string>
<string name="start_automatically_help">If checked, baresip starts automatically after device (re)start.</string>
<string name="listen_address">Listen Address</string>
<string name="listen_address_help">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 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 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 available addresses. If left empty (factory default), baresip listens at port 5060 of
all available addresses. all available addresses.
</string> </string>
<string name="preferIPv6">Prefer IPv6 if both IPv4 and IPv6 are available.</string> <string name="_0_0_0_0_5060">0.0.0.0:5060</string>
<string name="dnsServers">Comma separated list of DNS servers. Each DNS server is of form <string name="prefer_ipv6">Prefer IPv6</string>
<string name="prefer_ipv6_help">Prefer IPv6 if both IPv4 and IPv6 are available.</string>
<string name="dns_servers">DNS Servers</string>
<string name="dns_servers_help">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 []. \'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 Factory default value is \'8.8.8.8:53,[2001:4860:4860::8888]:53\' pointing to public Google
DNS servers.</string> DNS servers.</string>
<string name="opusBitRate">Average maximum bit rate used by Opus audio stream. <string name="opus_bit_rate">Opus Bit Rate</string>
<string name="opus_bit_rate_help">Average maximum bit rate used by Opus audio stream.
Valid value are 6000-510000. Factory default is 28000.</string> Valid value are 6000-510000. Factory default is 28000.</string>
<string name="iceLite">If checked, ICE Lite Mode is used.</string> <string name="ice_lite_mode">ICE Lite Mode</string>
<string name="callVolume">If set, default call audio volume at scale 1-10.</string> <string name="ice_lite_mode_help">If checked, ICE Lite Mode is used.</string>
<string name="debug">If checked, debug and info level log messages are available in logcat.</string> <string name="default_call_volume">Default Call Volume</string>
<string name="reset">If checked, configuration is reset to factory default.</string> <string name="default_call_volume_help">If set, default call audio volume at scale 1&#8211;10.</string>
<string name="debug">Debug</string>
<string name="debug_help">If checked, debug and info level log messages are available in logcat.</string>
<string name="reset_config">Reset to Factory Default</string>
<string name="reset_config_help">If checked, configuration is reset to factory default.</string>
<!-- Contact Activity -->
<string name="contact">Contact</string>
<string name="contact_name">Contact Name</string>
<string name="export_contacts">Export</string>
<string name="import_contacts">Import</string>
<!-- Contacts Activity -->
<string name="contacts">Contacts</string>
<!-- Generic -->
<string name="alert">Alert</string>
<string name="info">Info</string>
<string name="notice">Notice</string>
<string name="cancel">Cancel</string>
<string name="check">Check</string>
<string name="ok">OK</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="accept">Accept</string>
<string name="deny">Deny</string>
<string name="user_id">User ID</string>
<string name="password">Password</string>
<string name="sip_uri">SIP URI</string>
<string name="dots">&#8230;</string>
<!-- Main Activity -->
<string name="about">About</string>
<string name="quit">Quit</string>
<string name="outgoing_call_to_dots">Outgoing call to &#8230;</string>
<string name="incoming_call_from_dots">Incoming call from &#8230;</string>
<string name="transferring_call_to_dots">Transferring call to &#8230;</string>
<string name="invalid_sip_uri">Invalid SIP URI</string>
<string name="callee">Callee</string>
<string name="dtmf">DTMF</string>
<string name="call_info">Call Info</string>
<string name="duration">Duration</string>
<string name="codecs">Codecs</string>
<string name="rate">Rate</string>
<string name="voicemail_messages">Voicemail Messages</string>
<string name="call_already_active">You already have an active call!</string>
<string name="start_failed">Baresip failed to start! Listen Address was reset.
Restart baresip.</string>
<string name="registering_failed">Registering of %1$s failed</string>
<string name="no_microphone_permission">You have not granted microphone permission.</string>
<string name="verify">Verify</string>
<string name="verify_sas">Do you want to verify SAS</string>
<string name="transfer_query">Do you accept to transfer call to</string>
<string name="call_failed">Call failed</string>
<string name="call_closed">Call closed</string>
<string name="restart_needed">You need to restart baresip in order to activate the new config!</string>
<string name="call_not_secure">This call is NOT secure!</string>
<string name="peer_not_verified">This call is SECURE, but peer is NOT verified!</string>
<string name="call_is_secure">This call is SECURE and peer is VERIFIED!
Do you want to unverify the peer?</string>
<string name="unverify">Unverify</string>
</resources> </resources>

View File

@ -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.