title: Creating custom function in sqlite3 in android
body: <p>I need to add a custom function in sqlite3 in android app to calculate distance between two geo coordinate. i have found a <a href="http://daveaddey.com/?p=7" rel="noreferrer">c function</a> which can be added as a custom function in sqlite3.</p>
  
  <p>I am using NDK to compile sqlite3 files to create <code>.so</code> file. But I am not sure where to put code for my custom function which is also written in <code>C</code> and where to call <code>sqlite3_create_function(...)</code> which attaches custom function with sqlite so I can use my custom function in sqlite queries.</p>