[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-users] method not implemented yet
From: |
Guillaume BERAUDO |
Subject: |
Re: [Linphone-users] method not implemented yet |
Date: |
Wed, 17 Aug 2011 09:23:04 +0200 |
Hi Raouf,
> I'm trying to use linphone for Android development and I've problem
> with some method (crash due to unimplemented method: exemple:
> LinphoneCallLog#getStatus(), we can't retrieve duration of
> CallLogs ) . So is there a complete library and I missed that or I've
> to implement missing implementation .
First, the call status will not give you the duration of the
call:
typedef enum _LinphoneCallStatus {
LinphoneCallSuccess, /**< The call was sucessful*/
LinphoneCallAborted, /**< The call was aborted */
LinphoneCallMissed, /**< The call was missed (unanswered)*/
LinphoneCallDeclined /**< The call was declined, either locally or by
remote end*/ } LinphoneCallStatus;
The duration is stored, in seconds, in the duration field of the C
structure.
Linphone for Android is based on the liblinphone (implemented in C).
Example, to get the direction of a call log, you need to:
- declare a Java method in the LinphoneCallLog interface
org.linphone.core.LinphoneCallLog.getTo();
- declare a native method in the java implementation class
private native long getTo(long nativePtr);
- implement the JNI function in linphonecore_jni.cc;
extern "C" jlong Java_org_linphone_core_LinphoneCallLogImpl_getTo(JNIEnv* env
,jobject thiz ,jlong ptr) {...};
- implement the Linphone Android API method
org.linphone.core.LinphoneCallLogImpl.getTo().
If you decide to implement missing functions, don't hesitate to share
the patches.
Regards,
Guillaume