diff --git a/LinphoneCore.java b/LinphoneCore.java index c886c4038..1f8e73449 100644 --- a/LinphoneCore.java +++ b/LinphoneCore.java @@ -123,6 +123,15 @@ public interface LinphoneCore { */ public List getCallLogs(); + /** + * This method is called by the application to notify the Linphone core library when network is reachable. + * Calling this method with true trigger Linphone to initiate a registration process for all proxy + * configuration with parameter register set to enable. + * This method disable the automatic registration mode. It means you must call this method after each network state changes + * @param network state + * + */ + public void setNetworkStateReachable(boolean isReachable); /** * destroy linphone core and free all underlying resources */ diff --git a/LinphoneCoreImpl.java b/LinphoneCoreImpl.java index ba6f5a384..b1dedfeb4 100644 --- a/LinphoneCoreImpl.java +++ b/LinphoneCoreImpl.java @@ -51,6 +51,7 @@ class LinphoneCoreImpl implements LinphoneCore { private native long getCallLog(long nativePtr,int position); private native int getNumberOfCallLogs(long nativePtr); private native void delete(long nativePtr); + private native void setNetworkStateReachable(long nativePtr,boolean isReachable); LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException { @@ -155,4 +156,7 @@ class LinphoneCoreImpl implements LinphoneCore { throw new RuntimeException("object already destroyed"); } } + public void setNetworkStateReachable(boolean isReachable) { + setNetworkStateReachable(nativePtr,isReachable); + } }