Commit 21d25ef9 authored by Simon Morlat's avatar Simon Morlat

add get/set RemoteRingbackTone() to java wrapper

parent 908b906e
......@@ -3074,6 +3074,19 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setDeviceRotation(JNIEnv
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRemoteRingbackTone(JNIEnv *env, jobject thiz, jlong lc, jstring jtone){
const char* tone = NULL;
if (jtone) tone=env->GetStringUTFChars(jtone, NULL);
if (tone) env->ReleaseStringUTFChars(jtone,tone);
extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getRemoteRingbackTone(JNIEnv *env, jobject thiz, jlong lc){
const char *ret= linphone_core_get_remote_ringback_tone((LinphoneCore*)lc);
if (ret==NULL) return NULL;
jstring jvalue =env->NewStringUTF(ret);
return jvalue;
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setFirewallPolicy(JNIEnv *env, jobject thiz, jlong lc, jint enum_value){
......@@ -1799,4 +1799,17 @@ public interface LinphoneCore {
* @param listener to remove
public void removeListener(LinphoneCoreListener listener);
* Specifies a ring back tone to be played to far end during incoming calls, when early media is requested.
* @param file
public void setRemoteRingbackTone(String file);
* Return the ringback tone file used when doing early media. It may be null.
* @return the ringback tone file path.
String getRemoteRingbackTone();
......@@ -1303,4 +1303,14 @@ class LinphoneCoreImpl implements LinphoneCore {
public void removeListener(LinphoneCoreListener listener) {
removeListener(nativePtr, listener);
private native void setRemoteRingbackTone(long nativePtr, String file);
public void setRemoteRingbackTone(String file) {
private native String getRemoteRingbackTone(long nativePtr);
public String getRemoteRingbackTone() {
return getRemoteRingbackTone(nativePtr);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment