Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here is my function to call a map:
- holder.btnGPS.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Uri location = Uri.parse(holder.txtAddress.getText().toString().replace(" ", "+"));
- Intent intent = new Intent(Intent.ACTION_VIEW, location);
- intent.setPackage("com.google.android.apps.maps");
- startActivity(intent);
- }
- });
- and I have this permission set in my manifest:
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Advertisement
Add Comment
Please, Sign In to add comment