How to Built in Place Picker in Android
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.
Requirements -Google play service greater than 7.- 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) {
- // ...
- }
- }
- @Override
Read full blog at our highly specific C, php,iphone, Javascript,HTML, android developer forum about the topic described above "How to Built in Place Picker in Android". You can also learn much more about different programming technologies and can enhance your tech skills.