linphone-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-users] Linphone-android: Set Codecs (gsm, pcmu, pcma , etc


From: Winona Kwok
Subject: Re: [Linphone-users] Linphone-android: Set Codecs (gsm, pcmu, pcma , etc)
Date: Wed, 18 Apr 2012 09:35:03 +0800

Hi,

I have managed to set the default value to true for the codecs thanks to you!!! Thanks a lot!! However, I set defaultValue="true" in the preferences.xml. Is that fine?

On Tue, Apr 17, 2012 at 9:43 PM, Erhan Tepe <address@hidden> wrote:
Hi,

Open up "preferences.xml" and check for lines such as;

<CheckBoxPreference android:key="@string/pref_codec_gsm_key" android:title="@string/pref_codec_gsm" />


If you add android:defaultValue="false", the codec will be disabled initially. So the modified line will look like;


 <CheckBoxPreference android:key="@string/pref_codec_gsm_key" android:defaultValue="false" android:title="@string/pref_codec_gsm" />


To set new values in the code;


Editor e = mPref.edit();

e.putBoolean(getString(R.string.pref_codec_gsm_key), true);


where "mPref" is defined in LinphoneManager.java class as;


private SharedPreferences mPref;


So, if you are going to call this from another class, you can simply change it to;


public static SharedPreferences mPref;


and make calls such as;


Editor e = LinphoneManager.mPref.edit();


2012/4/17 Winona Kwok <address@hidden>
Hi Developers!

May I know how to programmatically set default values for the codecs (gsm, pcmu, pcma, etc) to true (as in where and how to set them)? Thanks for your help!

--
Best Regards,
Winona Kwok

_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users



_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users




--
Best Regards,
Winona Kwok

reply via email to

[Prev in Thread] Current Thread [Next in Thread]