I am using the Google Maps API for the map portion of my app, and MapBox for the search bar, and autocomplete suggestions when the user types into the bar. I've followed this documentation so far. https://blog.mapbox.com/in-app-search-for-android-8b18234656f1
But when I run my program, the search bar does appear, but whenever anything is typed into it my app crashes.
This is what the search bar before clicking on it looks like (The search bar object that I made): https://imgur.com/O8Z9xZQ
Hey everyone,
I am using the Google Maps API for the map portion of my app, and MapBox for the search bar, and autocomplete suggestions when the user types into the bar. I've followed this documentation so far. https://blog.mapbox.com/in-app-search-for-android-8b18234656f1
But when I run my program, the search bar does appear, but whenever anything is typed into it my app crashes.
This is what the search bar before clicking on it looks like (The search bar object that I made): https://imgur.com/O8Z9xZQ
After clicking the bar and the MapBox Search Bar appears: https://imgur.com/srVtWRf
Build Gradle: https://imgur.com/WTsFUnF
Error: https://imgur.com/zeJYEEB
Code:
Activity Launch:
Mapbox.getInstance(getApplicationContext(), "My key");
After clicking search bar:
public void onClick(View v)
{
OnActivityResult:
if (requestCode==8888 && resultCode==RESULT_OK)
{
CarmenFeature feature = PlaceAutocomplete.getPlace(data);
locateSearchResult(feature.address());
}
Expected Behavior: Search bar provides suggestions when letters are typed into it Actual Behavior: App crashes when letters are typed into search bar
Thank you