Wisej.NET Hybrid
HomeNewsSupportVideos
  • Start
    • Introduction
    • Getting Started
    • Going Native with Wisej.NET Hybrid
    • Features
    • API
      • General
        • DeviceInfoBase
        • Device
        • DeviceException
        • DeviceInfo
        • DeviceEvent
        • DeviceException
        • HybridResourcesAttribute
      • Shortcuts
        • DeviceAppActions
        • DeviceAppActionsInfo
        • DeviceAppInfo
        • AppAction
      • Navigation
        • DeviceAppLinks
        • DeviceBrowser
        • DeviceLauncher
        • DeviceNavigation
        • DeviceWindows
        • DeviceWindowsInfo
        • AppLinkEntry
        • BrowserLaunchMode
        • BrowserLaunchOptions
        • BrowserTitleMode
      • Authentication
        • DeviceAuthenticator
        • IWebAuthenticatorResponseDecoder
        • WebAuthenticatorOptions
        • WebAuthenticatorResult
      • UI
        • DeviceBackground
        • DeviceBorder
        • DeviceBottomBar
        • DeviceColors
        • DeviceMenuBar
        • DevicePopups
        • DeviceStatusBar
        • DeviceTabBar
        • DeviceTheme
        • DeviceToolbar
        • MenuItemClickedEventArgs
        • MenuItem
        • MenuItemType
        • AppTheme
        • StatusBarTextColor
        • TabBarItem
        • TabSelectedEventArgs
        • AppTheme
        • ToolbarItem
        • ToolbarItemClickedEventArgs
        • ToolbarItemType
      • Hardware
        • DeviceBatteryInfo
        • DeviceFlashlight
        • BatteryPowerSource
        • BatteryState
        • EnergySaverStatus
        • EnergySaverStatusChangedEventArgs
      • Sharing
        • DeviceClipboard
        • DeviceSharing
      • Communication
        • DeviceContacts
        • DeviceEmail
        • DeviceEmailInfo
        • DeviceSms
        • DeviceSmsInfo
        • Contact
        • EmailMessage
        • SmsMessage
      • Network
        • DeviceNetworkingInfo
        • ConnectionProfile
        • ConnectivityChangedEventArgs
        • NetworkAccess
      • Display
        • DeviceDisplay
        • DeviceScreen
        • DisplayInfo
        • DisplayInfo
        • DisplayInfoChangedEventArgs
        • DisplayOrientation
        • DisplayRotation
        • Orientation
      • Storage
        • DeviceFileSystem
        • DevicePreferences
        • DeviceResources
        • DeviceSecureStorage
        • FileSystemInfo
      • Location
        • DeviceGeolocation
        • DeviceMap
        • AltitudeReferenceSystem
        • DistanceUnits
        • GeolocationAccuracy
        • GeolocationRequest
        • Location
        • Placemark
        • MapLaunchOptions
        • NavigationMode
      • Vibration
        • DeviceHapticFeedback
        • DeviceHapticFeedbackInfo
        • DeviceVibration
      • License
        • DeviceLicenseInfo
      • System
        • DeviceLifecycle
        • DeviceSystemInfo
        • DeviceVersioningInfo
        • AppPackagingModel
        • DeviceIdiom
        • DevicePlatform
        • DeviceType
      • Notifications
        • DeviceLocalNotification
        • DeviceLocalNotificationInfo
      • Logs
        • DeviceLogs
      • Media
        • DeviceMedia
      • Permissions
        • DevicePermissions
        • PermissionStatus
        • PermissionType
      • Sensors
        • DeviceSensorInfo
        • DeviceSensors
        • AccelerometerChangedEventArgs
        • AccelerometerData
        • BarometerChangedEventArgs
        • BarometerData
        • CompassChangedEventArgs
        • CompassData
        • GyroscopeChangedEventArgs
        • GyroscopeData
        • MagnetometerChangedEventArgs
        • MagnetometerData
        • OrientationSensorChangedEventArgs
        • OrientationSensorData
        • SensorChangedEventArgs
        • SensorType
      • Shell
        • DeviceFlyout
        • DeviceTitleBar
        • FlyoutBehavior
        • FlyoutHeaderBehavior
        • FlyoutItem
        • FlyoutItemSelectedEventArgs
      • Speech
        • DeviceSpeech
        • Locale
        • SpeechOptions
      • Converters
        • UnitConverters
    • Architecture
    • Troubleshooting
  • Development
    • Basics
    • Email
    • Haptic Feedback
    • Invoke .NET MAUI Code
    • Invoke Platform Code
    • Launch External Apps
    • License Activation
    • Local Application
    • MacOS Desktop Development
    • Multiple Windows (Desktop)
    • Network Events
    • Notifications
    • Open the Map App
    • Remote Application
    • Shortcuts (App Actions)
    • SVG Images & Icon Packs
    • Unit Converters
    • Updating the App
    • Vibration
  • Android
    • Soft Keyboard
  • Images
    • App Icons
    • Splash Screen
  • Debugging
    • Debugging Overview
    • Dev Tunnels
    • Android
    • iOS
    • Windows
  • REST Web Services
    • Detect network connectivity
    • REST with HttpClient
    • Use platform-specific network features
  • Storage
    • Compare Storage Options
    • Store Data locally with SQLite
  • Extensions
    • Overview
    • Document Scanner
    • Remote Push Notifications
  • Advanced
    • Custom Handler
    • iOS Build Mechanics
    • Multi-Targeting (Hybrid Local)
  • Samples
    • Wisej.NET Features
    • Examples on GitHub
  • Deployment
    • Deployment Overview
    • Deployment Guide
  • Application Profiling
    • Android
    • iOS / macOS
    • Windows
Powered by GitBook
On this page
  • Get started
  • Android
  • Using the map
  1. Development

Open the Map App

PreviousNotificationsNextRemote Application

Last updated 1 year ago

Get started

To access the browser functionality, the following platform-specific setup is required.

Android

Android uses the geo: URI scheme to launch the maps application on the device. This may prompt the user to select from an existing app that supports this URI scheme. Google Maps supports this scheme.

In the Platforms/Android/AndroidManifest.xml file, add the following queries/intent nodes to the manifest node:

<queries>
  <intent>
    <action android:name="android.intent.action.VIEW" />
    <data android:scheme="geo"/>
  </intent>
</queries>

Using the map

The map functionality works by calling the Device.Map.TryOpen() method, and passing either an instance of the Location or Placemark type. The following example opens the installed map app at a specific GPS location:

public void NavigateToBuilding25()
{
    var location = new Location(47.645160, -122.1306032);
    var options = new MapLaunchOptions { Name = "Microsoft Building 25" };

    bool opened = Device.Map.TryOpen(location, options);
}

The Location and Placemark types are in the Wisej.Hybrid.Shared.Geolocation namespace.

When you use a Placemark to open the map, more information is required. The information helps the map app search for the place you're looking for. The following information is required:

  • CountryName

  • AdminArea

  • Thoroughfare

  • Locality

public void NavigateToBuilding()
{
    var placemark = new Placemark
    {
        CountryName = "United States",
        AdminArea = "WA",
        Thoroughfare = "Microsoft Building 25",
        Locality = "Redmond"
    };
    var options = new MapLaunchOptions { Name = "Microsoft Building 25" };

    bool opened = Device.Map.TryOpen(placemark, options);
}