I'm trying to show images based on location in android, it seems sqlite doesn't support Math functions, i have no idea what should i do, i have just 1 day to meet the dead line and no way to use NDK to define functions because i have no idea what the NDK is, for some reasons i had to move the query from Mysql server to android sqlite here is my query. any help will be appreciated.
select id, 3956*2*asin(sqrt(power(SIN((" + latitude + "-latitude)*pi()/180/2),2) +" +
"cos(" + latitude + "*pi()/180)* cos(latitude *pi()/180) * power(sin((" + longitude + " - longitude)*pi()/180/2),2))) as distance from " + LOCATIONS_TABLE_NAME + " limit 1