Can't talk right now?Get a quote · reply within 15 min
WhatsAppChat with us
Skip to main content

Facebook Friends Mapper Android !!hot!! -

private void setupMap() { SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); mapFragment.getMapAsync(this); }

private void showFriendDetailsDialog(FriendLocation friend) { new AlertDialog.Builder(this) .setTitle(friend.name) .setMessage("Location: " + friend.location + "\n" + "Coordinates: " + friend.latitude + ", " + friend.longitude) .setPositiveButton("Close", null) .setNeutralButton("Show on Map", (dialog, which) -> { LatLng position = new LatLng(friend.latitude, friend.longitude); googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(position, 12)); }) .show(); } facebook friends mapper android

@Override public void onMapReady(@NonNull GoogleMap map) { googleMap = map; // Enable zoom controls googleMap.getUiSettings().setZoomControlsEnabled(true); // Request location permission if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { googleMap.setMyLocationEnabled(true); } else { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_PERMISSION_REQUEST); } // Set map type googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL); // Set info window click listener googleMap.setOnInfoWindowClickListener(marker -> { FriendLocation friend = friendMarkers.get(marker.getTitle()); if (friend != null) { showFriendDetailsDialog(friend); } }); } " + friend.longitude) .setPositiveButton("Close"

</LinearLayout> </androidx.cardview.widget.CardView> null) .setNeutralButton("Show on Map"

<ProgressBar android:id="@+id/progressBar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:visibility="gone" />