Xamarin android autocomplete with google api places

Hello. How can I add a autocomplete to my app using the data from google api https://maps.googleapis.com/maps/api/place/autocomplete/json?input=ath&types=(cities)&key=xxxxx.

Thank you very much

5 Replies

RB Rabhia Beham Kathar Mideenar Syncfusion Team May 31, 2018 10:51 AM UTC

Hi Konstantinos,

Thanks for contacting Syncfusion Support.

We have analysed your requirement and have created a sample in SfAutoComplete Control.

In ResetService.cs:

var uri = new Uri("");

We have to give the url which we have to use.

When the country collection receives the collection. The result is shown in the AutoComplete DropDownItems.

Please have the sample from the below link.

Sample Link: http://www.syncfusion.com/downloads/support/forum/137855/ze/AutoCompleteAndroid-328440771
 

Please let us know if you have any concern.

Regards,
Rabhia Beham K.
 



KE Konstantinos Evangelidis May 31, 2018 01:32 PM UTC

Hello. Thank you for your answer. Unfortunately I am getting an error. The error is in MainActivity.cs , countryAutoComplete.DataSource = itm; Getting System.InvalidOperationException: Sequence contains no elements


RB Rabhia Beham Kathar Mideenar Syncfusion Team June 1, 2018 08:43 AM UTC

Hi Konstantinos,

Sorry for the inconvenience.

We would like to let you know that the error is not in the AutoComplete. It may be due to the authentication issue in the url provided to the itemsource. If the countryCollection in the RestService.cs receives the collection. The result will be shown in the AutoComplete.

Please let us know if you have any concern.

Regards,
Rabhia Beham K.



KE Konstantinos Evangelidis June 1, 2018 09:44 AM UTC

Hello. I am getting this error also using your default url. Without changing nothing


RB Rabhia Beham Kathar Mideenar Syncfusion Team June 5, 2018 12:09 PM UTC

 Hi Konstantinos,

Sorry for the inconvenience.

We have modified the sample and while the DataSource is getting loaded we have experienced an issue from our side. We are currently working on the issue and the issue fix will be available in the Volume 2 Sp 1 release 2018 which is expected to be rolled out by the end of June 2018. Please have the sample from the below link.

Sample Link: http://www.syncfusion.com/downloads/support/forum/137855/ze/Sample_21990697231 

Please let us know if you have any concern.

Regards,
Rabhia Beham K. 


Loader.
Up arrow icon