Android has now a built in Place picker, where user can pick the places. Developer can only send an intent and get result in OnActivityResult. In this blog we have explained evrything with complete source code. This is the best blog for android developers who are searching for "how to built in place picker in android".
- public void onPickButtonClick(View v) {
- // Construct an intent for the place picker
- try {
- PlacePicker.IntentBuilder intentBuilder =
- new PlacePicker.IntentBuilder();
- Intent intent = intentBuilder.build(this);
- // Start the intent by requesting a result,
- // identified by a request code.
- startActivityForResult(intent, REQUEST_PLACE_PICKER);
- } catch (GooglePlayServicesRepairableException e) {
- // ...
- } catch (GooglePlayServicesNotAvailableException e) {
- // ...
- .........
No comments:
Post a Comment