- Home /
Question by
DustinKaban · Dec 10, 2021 at 05:06 PM ·
notifications
Mobile Notifications asking for location access when I manually trigger it
When I use the mobile Notifcations settings and don't check "Include CoreLocation Framework" it works fine and doesn't prompt the user for location access.
When I use the default code given by Untiy to request access, I seem to prompt my users with a request for location access which I don't want.
Any suggestions?
IEnumerator RequestAuthorization()
{
var authorizationOption = AuthorizationOption.Alert | AuthorizationOption.Badge;
using (var req = new AuthorizationRequest(authorizationOption, true))
{
while (!req.IsFinished)
{
yield return null;
};
string res = "\n RequestAuthorization:";
res += "\n finished: " + req.IsFinished;
res += "\n granted : " + req.Granted;
res += "\n error: " + req.Error;
res += "\n deviceToken: " + req.DeviceToken;
Debug.Log(res);
}
}
Comment
Your answer
Follow this Question
Related Questions
How backward-compatibly write NotificationServices in Unity 2 Answers
What are the notification animations called when user scores? 1 Answer
How to send notification when the games is not running? 0 Answers
Implementing ingame notification system on item unlock 0 Answers
Notifications in Unity(Android) 0 Answers