Added setting to change image server sharing url
This commit is contained in:
parent
00c1ee4586
commit
0de84b872b
8 changed files with 21 additions and 5 deletions
|
@ -340,6 +340,7 @@
|
||||||
<string name="linphone_friend_new_request_desc">voudrait être partager son status avec vous et voir le votre.</string>
|
<string name="linphone_friend_new_request_desc">voudrait être partager son status avec vous et voir le votre.</string>
|
||||||
|
|
||||||
<string name="setup_ec_calibration">Calibration de l\'annulateur d\'écho en cours</string>
|
<string name="setup_ec_calibration">Calibration de l\'annulateur d\'écho en cours</string>
|
||||||
|
<string name="pref_image_sharing_server_title">Serveur de partage</string>
|
||||||
|
|
||||||
<string name="delete_contact">Supprimer contact</string>
|
<string name="delete_contact">Supprimer contact</string>
|
||||||
<string name="sip_address">Adresse SIP</string>
|
<string name="sip_address">Adresse SIP</string>
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
<string name="default_domain">sip.linphone.org</string>
|
<string name="default_domain">sip.linphone.org</string>
|
||||||
<string name="wizard_url">https://www.linphone.org/wizard.php</string>
|
<string name="wizard_url">https://www.linphone.org/wizard.php</string>
|
||||||
<string name="upload_url">https://www.linphone.org:444/upload.php</string>
|
|
||||||
|
|
||||||
<!-- Interface settings -->
|
<!-- Interface settings -->
|
||||||
<bool name="use_simple_history">true</bool>
|
<bool name="use_simple_history">true</bool>
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
<bool name="pref_animation_enable_default">false</bool>
|
<bool name="pref_animation_enable_default">false</bool>
|
||||||
<bool name="pref_autostart_default">false</bool>
|
<bool name="pref_autostart_default">false</bool>
|
||||||
<string name="pref_incoming_call_timeout_default">30</string>
|
<string name="pref_incoming_call_timeout_default">30</string>
|
||||||
|
<string name="pref_image_sharing_server_default">https://www.linphone.org:444/upload.php</string>
|
||||||
<string name="pref_audio_use_specific_mode_default">0</string>
|
<string name="pref_audio_use_specific_mode_default">0</string>
|
||||||
|
|
||||||
<bool name="pref_auto_accept_friends_default">false</bool>
|
<bool name="pref_auto_accept_friends_default">false</bool>
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
<string name="pref_push_notification_key">pref_push_notification_key</string>
|
<string name="pref_push_notification_key">pref_push_notification_key</string>
|
||||||
|
|
||||||
<string name="pref_auto_accept_friends_key">pref_auto_accept_friends_key</string>
|
<string name="pref_auto_accept_friends_key">pref_auto_accept_friends_key</string>
|
||||||
|
<string name="pref_image_sharing_server_key">pref_image_sharing_server_key</string>
|
||||||
|
|
||||||
<string name="pref_video_port_key">pref_video_port_key</string>
|
<string name="pref_video_port_key">pref_video_port_key</string>
|
||||||
<string name="pref_audio_port_key">pref_audio_port_key</string>
|
<string name="pref_audio_port_key">pref_audio_port_key</string>
|
||||||
|
|
|
@ -387,6 +387,7 @@
|
||||||
<string name="linphone_friend_new_request_title">Friend request</string>
|
<string name="linphone_friend_new_request_title">Friend request</string>
|
||||||
<string name="linphone_friend_new_request_desc">wants to share it\'s presence status with you and be aware of yours.</string>
|
<string name="linphone_friend_new_request_desc">wants to share it\'s presence status with you and be aware of yours.</string>
|
||||||
<string name="setup_ec_calibration">Echo canceller calibration in progress</string>
|
<string name="setup_ec_calibration">Echo canceller calibration in progress</string>
|
||||||
|
<string name="pref_image_sharing_server_title">Sharing server</string>
|
||||||
|
|
||||||
<string name="delete_contact">Delete contact</string>
|
<string name="delete_contact">Delete contact</string>
|
||||||
<string name="sip_address">SIP address</string>
|
<string name="sip_address">SIP address</string>
|
||||||
|
|
|
@ -292,6 +292,11 @@
|
||||||
android:defaultValue="@string/pref_incoming_call_timeout_default"
|
android:defaultValue="@string/pref_incoming_call_timeout_default"
|
||||||
android:layout="@layout/hidden"/>
|
android:layout="@layout/hidden"/>
|
||||||
|
|
||||||
|
<EditTextPreference
|
||||||
|
android:key="@string/pref_image_sharing_server_key"
|
||||||
|
android:title="@string/pref_image_sharing_server_title"
|
||||||
|
android:defaultValue="@string/pref_image_sharing_server_default" />
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:title="@string/pref_audio_hacks_title"
|
android:title="@string/pref_audio_hacks_title"
|
||||||
android:layout="@layout/hidden">
|
android:layout="@layout/hidden">
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
||||||
chatRoom = lc.createChatRoom(sipUri);
|
chatRoom = lc.createChatRoom(sipUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadServerUri = getActivity().getResources().getString(R.string.upload_url);
|
uploadServerUri = getActivity().getResources().getString(R.string.pref_image_sharing_server_key);
|
||||||
addVirtualKeyboardVisiblityListener();
|
addVirtualKeyboardVisiblityListener();
|
||||||
|
|
||||||
message.addTextChangedListener(new TextWatcher() {
|
message.addTextChangedListener(new TextWatcher() {
|
||||||
|
@ -641,10 +641,12 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
||||||
String[] proj = { MediaStore.Images.Media.DATA };
|
String[] proj = { MediaStore.Images.Media.DATA };
|
||||||
CursorLoader loader = new CursorLoader(getActivity(), contentUri, proj, null, null, null);
|
CursorLoader loader = new CursorLoader(getActivity(), contentUri, proj, null, null, null);
|
||||||
Cursor cursor = loader.loadInBackground();
|
Cursor cursor = loader.loadInBackground();
|
||||||
|
if (cursor != null && cursor.moveToFirst()) {
|
||||||
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||||
cursor.moveToFirst();
|
|
||||||
return cursor.getString(column_index);
|
return cursor.getString(column_index);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private void showPopupMenuAskingImageSize(String filePath, Bitmap image) {
|
private void showPopupMenuAskingImageSize(String filePath, Bitmap image) {
|
||||||
fileToUploadPath = filePath;
|
fileToUploadPath = filePath;
|
||||||
|
|
|
@ -53,6 +53,7 @@ import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.preference.CheckBoxPreference;
|
import android.preference.CheckBoxPreference;
|
||||||
|
import android.preference.EditTextPreference;
|
||||||
import android.preference.ListPreference;
|
import android.preference.ListPreference;
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
import android.preference.Preference.OnPreferenceClickListener;
|
import android.preference.Preference.OnPreferenceClickListener;
|
||||||
|
@ -106,6 +107,11 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
|
||||||
friends.setLayoutResource(R.layout.hidden);
|
friends.setLayoutResource(R.layout.hidden);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EditTextPreference imageSharingServer = (EditTextPreference) findPreference(getString(R.string.pref_image_sharing_server_key));
|
||||||
|
if (getResources().getBoolean(R.bool.disable_chat)) {
|
||||||
|
imageSharingServer.setLayoutResource(R.layout.hidden);
|
||||||
|
}
|
||||||
|
|
||||||
initializeTransportPreferences();
|
initializeTransportPreferences();
|
||||||
|
|
||||||
ecCalibratePref = findPreference(pref_echo_canceller_calibration_key);
|
ecCalibratePref = findPreference(pref_echo_canceller_calibration_key);
|
||||||
|
|
Loading…
Reference in a new issue