7

I need to add a custom function in sqlite3 in android app to calculate distance between two geo coordinate. i have found a c function which can be added as a custom function in sqlite3.

I am using NDK to compile sqlite3 files to create .so file. But I am not sure where to put code for my custom function which is also written in C and where to call sqlite3_create_function(...) which attaches custom function with sqlite so I can use my custom function in sqlite queries.

0

1 Answer 1

0

It seems like, in general and for all purposes, you can´t! but, there´s a workaround if you can install your own sqlite How can I create a user-defined function in SQLite?

Sign up to request clarification or add additional context in comments.

2 Comments

i just want to know where will put sqlite3_create_function() and how it will be call to setup communication with custom function.Is there any demo please provide.
ya i have implement all steps in app.but can not call custom function and through exception (does not found function)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.