Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShareGeoLocation not working without precise location #683

Closed
andriiginting opened this issue Sep 7, 2023 · 2 comments · Fixed by #691
Closed

ShareGeoLocation not working without precise location #683

andriiginting opened this issue Sep 7, 2023 · 2 comments · Fixed by #691
Assignees
Labels

Comments

@andriiginting
Copy link
Contributor

Describe the bug
When setShareGeoLocation enabled with Approximate location, Prebid will not send any geo-location payload and these are the queryParams that are sent by the SDK.

{
  "imp": [
    {
      "id": "3ba6a87b-9b4b-4cd0-8f3b-56093dda5a85",
      "instl": 0,
      "clickbrowser": 0,
      "secure": 1,
      "native": {
        "request": "{\"ver\":\"1.2\",\"context\":2,\"contextsubtype\":20,\"plcmttype\":1,\"seq\":0,\"assets\":[{\"required\":1,\"title\":{\"len\":90}},{\"required\":1,\"img\":{\"type\":1,\"w\":20,\"wmin\":20,\"h\":20,\"hmin\":20}},{\"required\":1,\"img\":{\"type\":3,\"w\":200,\"wmin\":200,\"h\":200,\"hmin\":200}},{\"required\":1,\"data\":{\"type\":1,\"len\":90}},{\"required\":1,\"data\":{\"type\":2,\"len\":-1}},{\"required\":1,\"data\":{\"type\":12,\"len\":-1}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}]}",
        "ver": "1.2"
      },
      "ext": {
        "prebid": {
          "storedrequest": {
            "id": "prebid-ita-banner-native-styles"
          }
        }
      }
    }
  ],
  "id": "3ba6a87b-9b4b-4cd0-8f3b-56093dda5a85",
  "app": {
    "name": "Prebid Kotlin Demo",
    "bundle": "org.prebid.mobile.prebidkotlindemo",
    "ver": "1.0.0",
    "publisher": {
      "id": "0689a263-318d-448b-a3d4-b02e8a709d9d"
    },
    "ext": {
      "prebid": {
        "source": "prebid-mobile",
        "version": "2.1.1"
      }
    }
  },
  "device": {
    "ua": "Mozilla/5.0 (Linux; Android 13; sdk_gphone64_arm64 Build/TE1A.220922.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.71 Mobile Safari/537.36",
    "lmt": 0,
    "make": "Google",
    "model": "sdk_gphone64_arm64",
    "os": "Android",
    "osv": "13",
    "language": "en",
    "carrier": "T-Mobile",
    "mccmnc": "310-260",
    "ifa": "279d2b8f-8d52-497b-84d8-f80d04bd0e8c",
    "h": 2220,
    "w": 1080,
    "connectiontype": 2,
    "pxratio": 2.75
  },
  "regs": {
    "ext": {
      "gdpr": 1
    }
  },
  "user": {},
  "source": {
    "tid": "3ba6a87b-9b4b-4cd0-8f3b-56093dda5a85"
  },
  "ext": {
    "prebid": {
      "storedrequest": {
        "id": "0689a263-318d-448b-a3d4-b02e8a709d9d"
      },
      "cache": {
        "bids": {}
      },
      "targeting": {}
    }
  }
}

To Reproduce
Use PrebidDemoKotlin
Steps to reproduce the behavior:

  1. Install PrebidDemoKotlin
  2. grant Location Permission from the Android settings screen
  3. Disable precise location
  4. Click on GAM original API Native In App
  5. Check prebid request from proxyman/charles/ Android Studio Logcat and check the "device" section of the payload.

Expected behavior
Once the user grant the location permission (regardless of precise location or Approximate location), should send geo location object to Prebid Server

Smartphone (please complete the following information):

  • Android device
  • OS: 13
@ChrisHuie ChrisHuie moved this from Triage to Ready for Dev in Prebid Mobile Prioritization Sep 18, 2023
@jsligh jsligh self-assigned this Sep 19, 2023
@jsligh jsligh moved this from Ready for Dev to In Progress in Prebid Mobile Prioritization Sep 19, 2023
@jsligh jsligh added the bug label Sep 19, 2023
@jsligh
Copy link
Collaborator

jsligh commented Sep 19, 2023

Location wasn't being set because when "use precise location" isn't checked, the app uses the Coarse location permission which was not being checked. The PR fixes this.

@andriiginting
Copy link
Contributor Author

thank you @jsligh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants