diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 000000000..15a15b218
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kiwix-lib.iml b/.idea/kiwix-lib.iml
new file mode 100644
index 000000000..d6ebd4805
--- /dev/null
+++ b/.idea/kiwix-lib.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 000000000..94813f590
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 000000000..aeff9e02f
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1562150865430
+
+
+ 1562150865430
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
new file mode 100644
index 000000000..0b0eed01c
--- /dev/null
+++ b/.vscode/c_cpp_properties.json
@@ -0,0 +1,16 @@
+{
+ "configurations": [
+ {
+ "name": "Linux",
+ "includePath": [
+ "${workspaceFolder}/**"
+ ],
+ "defines": [],
+ "compilerPath": "/usr/bin/gcc",
+ "cStandard": "c11",
+ "cppStandard": "c++17",
+ "intelliSenseMode": "clang-x64"
+ }
+ ],
+ "version": 4
+}
\ No newline at end of file
diff --git a/.vscode/ipch/68a3c1a579621cc7/mmap_address.bin b/.vscode/ipch/68a3c1a579621cc7/mmap_address.bin
new file mode 100644
index 000000000..d17d01629
Binary files /dev/null and b/.vscode/ipch/68a3c1a579621cc7/mmap_address.bin differ
diff --git a/.vscode/ipch/eae59a4735b0c0b5/mmap_address.bin b/.vscode/ipch/eae59a4735b0c0b5/mmap_address.bin
new file mode 100644
index 000000000..5ed7d809d
Binary files /dev/null and b/.vscode/ipch/eae59a4735b0c0b5/mmap_address.bin differ
diff --git a/src/android/kiwixreader.cpp b/src/android/kiwixreader.cpp
index 4af589a4b..9ffc7d90c 100644
--- a/src/android/kiwixreader.cpp
+++ b/src/android/kiwixreader.cpp
@@ -371,6 +371,30 @@ Java_org_kiwix_kiwixlib_JNIKiwixReader_getNextSuggestion(JNIEnv* env,
return retVal;
}
+JNIEXPORT jboolean JNICALL
+Java_org_kiwix_kiwixlib_JNIKiwixReader_getNextSuggestion(JNIEnv* env,
+ jobject obj,
+ jobject titleObj,
+ jobject urlObj)
+{
+ jboolean retVal = JNI_FALSE;
+ std::string cTitle;
+ std::string cUrl;
+
+ try {
+ if (READER->getNextSuggestion(cTitle, cUrl)) {
+ setStringObjValue(cTitle, titleObj, env);
+ setStringObjValue(cUrl, urlObj, env);
+ retVal = JNI_TRUE;
+ }
+ } catch (std::exception& e) {
+ __android_log_print(ANDROID_LOG_WARN, "kiwix", "Unable to get next suggestion");
+ __android_log_print(ANDROID_LOG_WARN, "kiwix", e.what());
+ }
+
+ return retVal;
+}
+
JNIEXPORT jboolean JNICALL
Java_org_kiwix_kiwixlib_JNIKiwixReader_getPageUrlFromTitle(JNIEnv* env,
jobject obj,
diff --git a/src/android/org/kiwix/kiwixlib/JNIKiwixReader.java b/src/android/org/kiwix/kiwixlib/JNIKiwixReader.java
index 86f5f455b..fb6e210c5 100644
--- a/src/android/org/kiwix/kiwixlib/JNIKiwixReader.java
+++ b/src/android/org/kiwix/kiwixlib/JNIKiwixReader.java
@@ -104,6 +104,8 @@ public class JNIKiwixReader
public native boolean getNextSuggestion(JNIKiwixString title);
+ public native boolean getNextSuggestion(JNIKiwixString title, JNIKiwixString url);
+
public native boolean getPageUrlFromTitle(String title, JNIKiwixString url);
public native String getDescription();