I'm trying to automate the app , but suddenly in middle the google permissions window for permission like phone , location etc pops up , is there any way that I can make sure always permission pop ups are allowed
Try to set desired capabilities:
autoAcceptAlerts = true
Since you said google permissions, I am assuming you are dealing in Android. Also since there is no language tag, I am sticking to Java, you can frame the logic in any language you are using.
Well, its sad to inform you that currently there seems to be no such capability added for android. Though iOS has few similar capabilities.
So, for android what you can do is logically -
If these pop-ups are device dependent, change the device settings that these pop-ups are not allowed.
If these pop-ups are relevant to application permissions, then you must know when they would occur. Just keep a check -
List<WebElement> popUp = driver.findElement(<find the pop up using your locator strategy>);
if(popUp.size()!=0) {
WebElement accept/dismiss = driver.findElement(<find the button accordingly>);
accept/dismiss.click();
}
Related
I've just added UnityAds to my app and whilst testing production I noticed instead of an ad, it popped up a request to place cookies on the users device.
The SDK integration was fine but is an absolute deal breaker for me. Is there any way to turn on a setting where it doesn't do this? I turned off the seek personalised ads request in the iOS app, I don't want my users interrupted like this. I'd like to reject all on their behalf before they see it.
Yes, you can do that. Use my following code to pass the consent flag to Unity Ads SDK. And make the Unity Ads SDK not request cookie permissions for your users by setting this flag to false
MetaData gdprMetaData = new MetaData("gdpr");
gdprMetaData.Set("consent", "false");
Advertisement.SetMetaData(gdprMetaData);
// then Setup Unity ads
For people who is using Ironsource Mediation and have Unity Ads in waterfall but having the same problem.
IronSource.Agent.setConsent(false);
Warrning: but if you do that, all ads will not be personalized. The best way I recommend to you is:
On first opening, You need to show ATT (Application Tracking Transparency) popup. Then if the user clicks Allow then you set the consent to true if the user clicks Don't allow (Require apps not to track) then you set the consent false.
by the way:
If you don't want to show ATT in the first time. You need to set consent as false until ATT shows
*** Edit *** Ok found it in Swift, posting the code for posterity - Magoo
let meta = UADSMetaData()
meta.setRaw("gdpr.consent", value: false)
meta.commit()
My app has an several shareable route map links that are formatted as follows and no longer work - meaning they won't natively open in the browser. Instead, both iPhone and Android see the link and are trying to open in Google Maps APP - which breaks the links:
var link = https://www.google.com/maps/d/viewer?mid=14DdJfOLp26RFilzX0tp2hs_M7gBBNFkk&ll=27.931760141489143%2C-82.47564270000004&z=16
window.open(link,'_system','location=yes') ;
I found similar issues from users talking about the problem, but the fix (if it works) requires the user to tweak some settings on their phone. (issue: https://support.google.com/maps/thread/8806737?hl=en ) which for app developers is not a solution.
Previously when opening the links it would natively open in the phones/system default browser (ie: chrome/safari) and everything worked fine. Recently this behavior has changed. Both iPhone and Android phones now seem to recognize the url google.com/maps causing the system to ask the user to open this link in their Maps app....or in the system browser. On iPhone, it doesn't even ask, it just defaults to using the map app. If the user chooses to open in the map app (or on iPhone it simply defaults to it), the above shareable route map won't load - saying map can't be found (or some other error).
On Android, since it at least asks the user: Maps or Chrome - if the user chooses Chrome then the link will work.
This new default behavior is causing shareable route maps to break on iPhone...and on Android where users choose Maps over Chrome.
On Android, I found a way to force these types of maps to use Chrome by using a url scheme. Forcing the map to chrome would look like:
window.open("googlechrome://" +link,'_system','location=yes') ;
However, a url scheme does not exist for Safari on iPhone...causing even this kind of work around to still break on iPad and iPhones.
Either google needs to allow shareable maps back on the default Map app....and/or iPhone needs to create a specific url scheme for Safari....preferably both.
OR....does anyone else have a fix/work around for this on iPhone - or in general?
I have the following code to open Navigation App from one of the button click in my content page.
var location = new Location(Convert.ToDouble(jobItem.Latitude), Convert.ToDouble(jobItem.Longitude));
var options = new MapLaunchOptions { NavigationMode = NavigationMode.Driving };
await Map.OpenAsync(location, options);
There are Google Maps and Waze in my android phone, so the code above did show the selection panel and let user to choose which app to use which is no issue. However, when this meet iOS, it straight away open Apple Maps without any selection even though there are 3 navigation apps in the iPhone. I have tried to research to deal with the default navigation app setting on iOS but unfortunately iOS didn't provide any single option to set the app as default unlike android. What else I can do?
You could use the Xamarin.Essentials: Launcher NuGet package.
You'd need to modify the code to look something like the below pseudocode
var supportsWaze = await Launcher.CanOpenAsync("whateverTheWazeUriSchemeIs://");
var supportsGoogleMaps = await Launcher.CanOpenAsync("whateverTheUriSchemeIs://");
You'd then need to give the user some sort of UI for them to select a mapping app based upon these boolean(s) being true. I'd use an ActionSheet
Then you can use the await Launcher.OpenAsync method to open the correct URI based on whatever choice the user made. You could offer them the option to remember this choice for later as well.
iOS wont allow you to override the OS default apps, but within your own app you can choose how other applications are launched. The Google applications are a good example of this.
I have a very simple application that uses realtime location data to obtain relevant information, developed in C# as a UWP 10.0 application.
My interaction with the geolocation API is very simple: I only checked Location in the "Package Manifest" under "Capabilities" and I only use the following API call:
var locator = new Windows.Devices.Geolocation.Geolocator();
var location = await locator.GetGeopositionAsync();
When this call is first made, Windows 10 throws up an "Allow this application to use your precise location [yes | no]" dialog. Selecting "yes" seems to "save" this choice for around 5 minutes or so; subsequent attempts at obtaining the user's position within the next five minutes go through (I believe they return the cached value, as it never seems to change), but more than 5 minutes later, the permission dialog is always shown once more (even though the user has already authorized it).
From my reading of the geolocation API documentation on MSDN, I can find nothing to suggest that this is the intended behavior. Under privacy settings in the metro control panel, this application is under the list of apps allowed to use the precise location. What's more, other apps in that list with precise location enabled have never prompted me to allow them access to the precise location past the first time.
What am I doing wrong here and how can I prevent this dialog from constantly popping up?
EDIT
With await Geolocator.RequestAccessAsync(), the permissions are cached so long as the exe is not modified/re-compiled.
I was able to replicate your problem. But according to official documentation, it clearly mentions, that you need to call RequestAccessAsync() before any calls.
So when I made change from your lines of codes, to below, permission Request window showed up only once and subsequent calls were made directly.
GeolocationAccessStatus accessStatus = await Geolocator.RequestAccessAsync();
if (accessStatus == GeolocationAccessStatus.Allowed)
{
Geolocator locator = new Geolocator();
Geoposition location = await locator.GetGeopositionAsync();
locText.Text = location.Coordinate.Point.Position.Latitude + Environment.NewLine + location.Coordinate.Point.Position.Longitude;
}
I've had an issue on my app overnight that I thought was a coding bug. The issue is that the SFSafariViewController login window (Safari based) - is no longer being presented. Instead, it is launching a new Safari app, and once I log in, I now get the native iOS dialog "Open his page in "XXXXXApp"? I didn't change any settings, didn't play with anything at all. After downloading the source for the FSBDK iOS and debugging, it turns out that "SFSafariViewController" is being disabled by facebook explicitly.
I made a graph call, the same one that the app uses to start up to this endpoint:
https://graph.facebook.com/v2.7/<app-id>?fields=app_events_feature_bitmask%2Cname%2Cdefault_share_mode%2Cios_dialog_configs%2Cios_sdk_dialog_flows.os_version%289.3.0%29%2Cios_sdk_error_categories%2Csupports_implicit_sdk_logging%2Cgdpv4_nux_enabled%2Cgdpv4_nux_content%2Cios_supports_native_proxy_auth_flow%2Cios_supports_system_auth%2Capp_events_session_timeout&format=json&include_headers=false&sdk=ios
And the response appears to disable the controller SFSafariViewController. The evidence in this portion of the payload:
"ios_sdk_dialog_flows": {
"default": {
"use_native_flow": true,
"use_safari_vc": false
}
}
Previously, the use_safari_vc value was set to true. In anyone answers, please keep in mind I want to use the Safari View Controller - but not launching safari as it falls back to now. The latest behaviour asks to open my app, which I thought the Safari View Controller was meant to solve! Also keep in mind that everything was functioning well until this morning. I've tried recreating my app multiple times, but the same behaviour still persists.
Help, my user experience with Facebook is now terrible (and note, I don't care about using native behaviour - I just want Safari View Controller again!)
I'm using v4.15.0 of the Facebook SDK
Cheers
I got word from Facebook developers group that it was an issue on the server side, and that change has been reverted.