I will develop an app that needs to detect if the gps location is 25m (max) near a church.
My system wont really work. I really want to integrate a feature that detects if the location is 25m around a church (using category mark). How can i do this? I also only want to use free to use services. If someone has an better service for this using open street map then please tell me.
My current code for detecting the church:
Detection feature now:
private boolean checkIfNearChurch(Address address) {
String featureName = address.getFeatureName();
String subLocality = address.getSubLocality();
return featureName != null && featureName.toLowerCase().contains("kirche") ||
subLocality != null && subLocality.toLowerCase().contains("kirche");
}
Needed for this:
public void onClick(View v) {
if (isNearChurch){
addDatatoFirebase();
} else {
Toast.makeText(Activity_Summarize.this, "Du bist nicht in der Nähe einer Kirche!", Toast.LENGTH_SHORT).show();
}
}
I tried asking some AIs like Gemini for a solution but no Ai could help me with this problem.
I expect a good solution that helps me developing my app.