the microsoft document says that accessing location doesn't need permission in windows platform
https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device/geolocation?view=net-maui-7.0&tabs=windows
However,my program got an error
Microsoft.Maui.ApplicationModel.PermissionException: You need to declare the capability `location` in your AppxManifest.xml file
at Microsoft.Maui.ApplicationModel.Permissions.BasePlatformPermission.EnsureDeclared()
at Microsoft.Maui.ApplicationModel.Permissions.LocationWhenInUse.CheckStatusAsync()
at Microsoft.Maui.ApplicationModel.Permissions.EnsureGrantedAsync[TPermission]()
at Microsoft.Maui.Devices.Sensors.GeolocationImplementation.GetLocationAsync(GeolocationRequest request, CancellationToken cancellationToken)
at PowerSaver.MainPage.GetCurrentLocation()
I use the example form official one,though.
_isCheckingLocation = true;
GeolocationRequest request = new GeolocationRequest(GeolocationAccuracy.Medium, TimeSpan.FromSeconds(10));
_cancelTokenSource = new CancellationTokenSource();
Location location = await Geolocation.Default.GetLocationAsync(request, _cancelTokenSource.Token);
if (location != null)
Console.WriteLine($"Latitude: {location.Latitude}, Longitude: {location.Longitude}, Altitude: {location.Altitude}");
System details:
Version Windows 11 professional workstation Insider Preview
Edition 22H2
System edition 25236.1010
Experience Windows Feature Experience Pack 1000.25236.1010.0
sorry for my poor english & thank you
how can I fix the permission error?
I tested the code you provided and also meet the question that Windows platform can't access location.
But I solved this issue. In Windows 11, in Location privacy settings my Location services wasn't on. So, I turned it on, and now it is working.
In addition, if you also want to run it on Android platform, remember to add this to your AndroidManifest:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Related
Firstable, i don't know if this is the best place to ask this.
I made a clean Catalina OSX (10.15.7) install, and i'm trying to access to Document Folder using Sql Developer, but i don't know what is the problem.
If you see the image, this is the error:
I'm using java version "11.0.9" 2020-10-20 LTS
What is wrong?
Folder permissions
Best regards
UPDATE:
The same error with other folders
Go to System Preferences → Security & Privacy → Privacy → Full Disk Access.
Click add ([+]) and grant access to /bin/bash.
Yes, same Error here.
Installed Java 11 and SQL-Developer "20.2..." on a fresh macOS Big Sur (also tested it with a fresh install of macOS Catalina).
Can't access my desktop-, documents-, downloads-directory and /home through the import/open-dialog of SQL-Dev. Other directories can be accessed.
In the macOS-privacy-settings I granted Java 11 to full access my drive.
Starting the SQL-Developer manuell via sudo "solves" the problem.
I have AppxBundlefile of Forza Horizon 4, downloaded it manually. Installed it using:
add-appxpackage Microsoft.SunriseGame.EAppxBundle
and it was successful, renamed the file to have a shorter name. the problem is Windows store does not detect it, the name of the app is not listed in the Windows store Installed apps, I can't seem to update it when an update becomes available for it.
I've done the same procedure for another app, a 35GB game Sea of Thieves, and it worked just fine, the app appeared in the list of Installed apps on Windows store.
any idea how to manually register that app so that Windows store can detect it and list it as installed app?
Some of the troubleshooting steps listed here may help:
https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_store/error-0x803f8001-window-10/45d2902c-5f4d-437c-98bb-34a45aacdd3c
PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage Microsoft.WindowsStore).InstallLocation + '\AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"
or
Go to Settings --> Apps --> apps & features --> (game that's didn't work) --> advanced options --> reset
or
Open Services.msc -> Windows PushToInstall Service -> Start Service
a user on reddit also tried to this for Forza Horizons 4 Demo, but had a corrupted package,
https://www.reddit.com/r/Windows10/comments/9j673w/trying_to_use_the_addappxpackage_feature/
The creation fails at this stage:
The user has admin rights on her laptop. Thoughts?
One possible reason could be the location of the project on the device. Windows 8/8.1/10 prevents access to many of the the directories in C: (or the drive where it is installed).
Try running netbeans as an admin or changing the location of the project.
The culprit was the anti virus. Thanks to Shai for the pointer.
I am new to MongoDB and is trying to get this new Database connected with my Web api application ..But i am not able to add MongoDB.driver nuget for my Webapi project.Please refer screen shot.
My search is struck on this window for like forever.,have even restarted my project for a couple of times now.
I also tried installing this package through
PM>Install-Package MongoDB.Driver
But then this is shown
Am I doing something wrong ..?
i tried opening this url"api.nuget.org/v3/index.json"...but it says this site cant be reached..what does that mean?
Since the you could not open the url in browser directly, there should be some internet limitations in your internet environment. If you are work in the company, I suggest you contact your office IT to confirm whether they add any limitations and whether used any proxy. If they are using some proxy, you need to set the proxy settings in NuGet.Config file which store in C:\Users\user name\AppData\Roaming\NuGet as below settings. Detailed information please refer to the Proxy settings part in Nuget Config Section & Nuget Proxy Settings.
<add key="http_proxy" value="host" />
<add key="http_proxy.user" value="username" />
<add key="http_proxy.password" value="encrypted_password" />
Besides, you can chech the proxy in your machine: Open "System Properties" > Advanced > Environment Variables. Find the http_proxy var (in System variables), select and delete it.
I've reached an impasse trying to get Eclipse configured for Lotus Notes 8.5 Plug-in Development, and am frantically searching for advice on how to do it correctly.
I've searched the Web and found several articles on how to do it, but none of them seem to be working on my machine. (I have not attempted to do it on another machine.)
The machine's configuration is as follows:
Windows 7 Ultimate 64-bit
Intel Core i5 CPU
6 GB RAM
To the best of my knowledge, the following are the prerequisites:
JDK 6 SE (SR 2) (32-bit)
Lotus Notes 8.5.1 Designer (32-bit)
Lotus Expeditor Toolkit 6.2.2 (32-bit) <-- WRONG!!! 6.2.1!!
Eclipse Ganymede (32-bit)
Here are the installation & configuration steps I've taken.
Install the JDK and JRE to c:\java
Modify the computer's PATH environment variable to include C:\java\jdk6\jre\bin.
Extract Eclipse Ganymede to c:\eclipse.
Install Notes to c:\lotus\notes
Install Expeditor to c:\lotus\expeditor
Configure Expeditor as described here.
Configure Eclipse for Notes 8.5 development as described here.
The problem arises when I attempt to create a Client Services project (a plug-in). When I create the plug-in project, and Eclipse starts generating the code, the following are found in the Event Log:
"Unable to satisfy dependency from com.ibm.pvc.tools.composite-feature.feature.group 6.1.2.200801281900 to requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.equinox.common/[3.2.0,3.3.0)."
InvalidRegistryObjectException thrown in org.eclipse.core.resources. (Occurs multiple times.)
ConcurrentModificationException was thrown in org.eclipse.core resources.
And my favorite: Cannot nest 'C:Lotus/Notes/framework/rcp/eclipse/plugins/com.ibm.esupport.client.product.SSC4TNF_4.0.0.20090925-1604/core' inside library 'C:Lotus/Notes/framework/rcp/eclipse/plugins/com.ibm.esupport.client.product.SSC4TNF_4.0.0.20090925-1604' (This occurs for multiple packages.)
The list of exceptions goes on. I'll provide all I can if they're requested.
Clearly, I'm doing something wrong. It cannot be this difficult (or counter-intuitive) to get these technologies to play together.
Can someone please provide me with information about the correct requirements (prerequisites, et. al.) and how to set them up? This is kind of a mission critical thing, and the developer who originally did this work left no spec for his environment configuration. I'm completely in the dark.
HALP!!!!
EDIT
As pointed out, I'm using Expeditor 6.2.1, not 6.2.2. I verified this by viewing the license in the Expeditor folders, and viewing the contents of the site.xml file:
<site>
<feature id="com.ibm.pvc.tools.composite-feature" patch="false" url="features/com.ibm.pvc.tools.composite-feature_6.2.1.20090918-0145.jar" version="6.2.1.20090918-0145">
<category name="desktop" />
</feature>
<feature id="com.ibm.rcp.win32.devicetools.feature" patch="false" url="features/com.ibm.rcp.win32.devicetools.feature_6.2.1.20090918-0145.jar" version="6.2.1.20090918-0145">
<category name="desktop" />
</feature>
<category-def label="desktop" name="desktop">
<description>Lotus Expeditor Toolkit</description>
</category-def>
</site>
You say you're using Lotus Expeditor Toolkit 6.2.2, yet in the first error message I read "6.1.2.200801281900". This seems odd to me. I read the first error message as: "The 6.1.2 group feature requires Equinox Common 3.2.0 or 3.3.0". Equinox Common for Ganymede is 3.4.x
Also, you may find some of the comments in this link useful...
Edit
I just noticed the error message says [3.2.0,3.3.0). I had assumed the closing parentheses was supposed to be a bracket, but I suppose it might be using range notation, in which case I'd guess it actually means it specifically requires 3.2.x.