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.

shashwat
  • 7,851
  • 9
  • 57
  • 90
Rajan1404930
  • 422
  • 5
  • 15

1 Answers1

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?

Community
  • 1
  • 1
eduyayo
  • 2,020
  • 2
  • 15
  • 35
  • 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. – Rajan1404930 Aug 27 '14 at 12:25
  • ya i have implement all steps in app.but can not call custom function and through exception (does not found function) – Rajan1404930 Aug 27 '14 at 12:32