skip to Main Content

My app’s location permission popup is like this:

My app's location permission popup is like this

I need it like this (found on net):

I need it like this (found on net)

I’m doing my project in flutter, so what modifications I need to do get popup like in second image.

So I’m expecting to get solution to my issue solved

3

Answers


  1. The popup shown in the first screenshot (which is from yours) is the Android location permission popup. See this section from the Android Developers page.

    The popup shown in the second screenshot is the iOS location permission popup. See this page on the "Give apps permission to use your location" section.

    You can’t get the second popup on Android.

    Login or Signup to reply.
  2. You can not add custom message in android location permission popup, but you can add in iOS you can also see the screenshot you added with custom message is on iOS.
    For iOS you can add these line in iOS/Runner/info.plist, and you can change the message:

    <key>NSLocationWhenInUseUsageDescription</key>
    <string>This app needs access to location in the background.</string>    
    <key>NSLocationAlwaysUsageDescription</key>
    <string>This app needs access to location when in the background.</string>
    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>This app needs access to location when open and in the background.</string

    And for android what you can do is add a custom dialogue to show you message and then after that you can open the default popup.

    Login or Signup to reply.
  3. this is impossible to do. have a look at the following article which explains the reason behind this perfectly.

    check out this post

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search