Current user location return from GetGeopositionAsync always several hundred meters away fromm actual location
When I tested my app which uses Geolocator.GetGeopositionAsync to get the current user's location, the returned coordinate is always several hundred meters away from the actual location, even if the returned PositionSource is from GPS with accuracy of several
meters.
I was using Lumia 930 as a testing tool.
The following is my code:
//get current location
var geo = new Geolocator { DesiredAccuracy = PositionAccuracy.High, DesiredAccuracyInMeters = 10};
var currentLocation = await geo.GetGeopositionAsync();
//mark location on the map.
var point=currentLocation .Coordinate.Point;
MapIcon MapIcon1 = new MapIcon();
MapIcon1.Location = point;
MapIcon1.NormalizedAnchorPoint = new Point(0.5, 1.0);
MapIcon1.Title = "I'm here";
MapControl1.MapElements.Add(MapIcon1);
await MapControl1.TrySetViewAsync(point, 18D, 0, 0, MapAnimationKind.Bow);
Any idea why is this?
From an API perspective, there's not much we can do about it. Do you know if the problem reproduces on other phones, other Lumia 930s? Maybe there's a problem with your specific phone?
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
objects and unknown namespaces.
Similar Messages
-
Find my iPhone showing several hundred miles away
'Find my iPhone' is showing one of our phones as being several hundred miles away. (i.e.: we're in GA...it's showing phone in Texas). It's an iPhone 5s that is showing this. Has the phone been hacked somehow, or is this an issue with the app?
Thanks.Do you have Location Services turned on? Without that for GPS accuracy, Find My IPhone falls back on Wi-Fi to determine where it is and that depends on an oft outdated database of known Wi-Fi hotspots.
-
How to extract current user SQL password from SAP
I have an external exe that needs to connect via ADO to the currently running SAP application using the current user.
I used the SAPbobsCOM.Company object to extract the
CompanyDB , Server ,DbUserName and Password to create my ADO connection string. But obviously the password is encrypted and (when I debug.print gives me ****) is not useful.
Does anyone know how to get this password through the SDK?
Thanks,
Indika.Hi,
I've already asked about it. No way. Simply forget.
You can ask for password for the first time and store it in the database or in the registry.
Regards,
Mark
Message was edited by: Mark Gulyansky -
Call Custom Service from Event Receiver as Current User
Hello,
i bang my head on this problem for days now:
My custom web service hosted in Sharepoint 2013 needs to know the logged on user name. I used to have a self-written impersonation in my service client before, but with switching to claims authentication this should be obsolete.
So within my service i decode the user from
IClaimsPrincipal icp = Thread.CurrentPrincipal as IClaimsPrincipal;
IClaimsIdentity ci = (IClaimsIdentity)icp.Identity;
String User = ci.ToString();
This works well when i call the service from a custom aspx page.
It utterly fails when i call the service from a List Item Event Receiver. The User always is the Application Pool Account.
This is the Client code to open the Channel:
private void SetChannelFactory(
MyServiceApplicationProxy proxy,
Uri address)
if (null == proxy)
throw new ArgumentNullException("proxy");
if (null == address)
throw new ArgumentNullException("address");
// Check for a cached channel factory
string endpointConfigurationName = GetEndpointConfigurationName(address);// Get the endpoint configuration name
if ((null == s_ChannelFactory) || (endpointConfigurationName != m_EndpointConfigurationName))
lock (s_ChannelFactoryLock)
if ((null == s_ChannelFactory) || (endpointConfigurationName != m_EndpointConfigurationName))
// Create a channel factory without specifying an endpoint address
// so it can be cached and used for multiple endpoint addresses
s_ChannelFactory = new ConfigurationChannelFactory<IMyServiceContract>(
endpointConfigurationName, proxy.Configuration, null);
// Configure the channel factory for claims-based authentication
s_ChannelFactory.ConfigureCredentials(SPServiceAuthenticationMode.Claims);
foreach (var operation in s_ChannelFactory.Endpoint.Contract.Operations)
DataContractSerializerOperationBehavior behavior = operation.Behaviors.Find<DataContractSerializerOperationBehavior>() as DataContractSerializerOperationBehavior;
if (behavior != null)
behavior.MaxItemsInObjectGraph = 2147483647;
// Store the current endpoint configuration name.
m_EndpointConfigurationName = endpointConfigurationName;
private IMyServiceContract GetChannel(
MyServiceApplicationProxy proxy,
Uri address)
//Create Channelfactory
SetChannelFactory(proxy, address);
// Create a channel from the channel factory.
return s_ChannelFactory.CreateChannelActingAsLoggedOnUser(new EndpointAddress(address));
All research pointed out that "CreateChannelActingAsLoggedOnUser" would pass the current user (which is correctly identified within the event receiver!) to the service, but it doesn't work for my event receiver...
Any advice on this would be great!
With kind regards,
JoachimYou should be able to get the current user id from the SPListItemEventProperties object. From here you should be able to create a Claim. For example get the user by using
user = SPWeb.Users.GetByID(properties.CurrentUserId)
SPClaim claim = SPClaimProviderManager.CreateUserClaim(user.email, SPOriginalIssuerType.TrustedProvider, issuerIdentifier);
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.claims.spclaimprovidermanager.createuserclaim(v=office.14).aspx
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer -
How can I take the files that were migrated from my PC to my Mac and add all those files to my current user instead of having 2 users? Having to log out just to sign in on a different user to access the files is absurd.
Do I make all the files sharable to all the NOW users on the mac then just delete the files? Or can i erase my account that I made when starting up my new mac and then just use the one with the transferred files?
I just dont want to have to og in and out of 2 different accounts .. Help please.
-NinaSorry. /Users is a folder path. It would be similar to C:\Users (if that exists on Windows).
So, in the Finder, select Computer from the Go menu.
You'll see Macintosh HD, double-click that to open it.
In there you'll see several folders. One is Users. That is where all the user Home folders exist. Select the other account's home folder and go to step 3.
If you have any more confusion, please stop and ask. We'll get there.
If you feel more comfortable, you can just log into that other account and move the files into /Users/Shared.
Then, log into the account you wish to use and copy the files from the Shared folder and paste them into your Home folder, wherever they belong, Documents, Music, Pictures, etc. That just takes a little more work. Transferring them into Shared, and then copying into your home sets the permissions on the files so that you won't have a problem accessing them later. The steps I provided just prevent you from having to do the double move, since you are not going to use the old account once you are done.
Quick unix shorthand. If someone gives you a file path that begins with a /, that means the root of the hard drive, ie Macintosh HD (if you haven't renamed it). The path separator in unix is /, not \.
A path that starts with ~/ means your Home folder, the one inside /Users named with your account name. -
How-To Display the Number of Records Returned from a List to the User?
We currently are using lists to identify accounts that meet various criteria. Because the territories vary from 4k to 60k customers the users have stated that they don't know the size of the list and therefore don't know if they need to refine the list. Currently they are exporting to Excel to look at the row count to see if they need to further refine their searches. This takes quite a while and while shuffling through many lists is a bit painful. Isn't there a way to just show the total records returned from the list down at the bottom of the screen where it allows you to see 25/50/75/100 records at a time?
There is probably a simple way to do this but it is a large user dissatisfier at the time because we simply don't know how to make this show up. Again we are using lists and not analytics for simple lists at this time.
- john
Edited by: user11286597 on Jun 19, 2009 11:02 AMThanks Bobb. I can't believe that one wasn't in R1 :)
Is there a link to the items being worked in the next release by any chance?
- john -
How to Get the Current Logged user location ID in SharePoint online
Hi All ,
Please suggest me how we can get the SharePoint online current Login user
Location ID
Actually i want to show the weather report in my SharePoint online site (App Part in SharePoint Online Site)
Suppose SPO user Login From India(Delhi) so that i want to show the India(Delhi) weather report
If Login user from US(dallas) so that US user see the US(dallas) weather report
Thanks
Deepak Chauhan
SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design@Mohamed
Derhalli ,
Suppose SPO user Login From India(Delhi) so that i want to show the India(Delhi) weather report
If Login user from US(dallas) so that US user see the US(dallas) weather report
so without using how we can show the weather report can you please suggest me how we can show the weather report
Reply ..
Thanks
Deepak Chauhan
SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design -
RTC-5230 - Location DEV_LOC has not been registered by the current user
All,
We have recently migrated our dev environment to new hardware and I need to change the OWB Location details to reflect this - I am now attempting to unregister the locations in the Control Center but am getting the following error:
RTC-5230: Location DEV_LOC has not been registered by the current user
Is there a view I can use to find out which user registered the Location?Look at this thread (steps for unregsitering location)
Re: Unable to connect control center and start runtime service
Regards,
Oleg
PS. Before using unregister_location.sql script unregister this location in Warehouse Builder Browser (Locations Report section).
This prevent from displaying error "Location ... is registered in this repository" during execution this script -
Get the last query from the current user
Is there a way to get the last query of the current user, so every query could be log with a database trigger?
Let's just say I execute:
DELETE xxxx;
I tried :
SELECT T.SQL_TEXT FROM V$SQLAREA T where ADDRESS=(SELECT prev_sql_addr FROM v$session where audsid=userenv('sessionid'));
But the result of this query is :
'SELECT T.SQL_TEXT FROM V$SQLAREA T where ADDRESS=(SELECT prev_sql_addr FROM v$session where audsid=userenv('sessionid'))'
Is there a way to execute a query that would return :
'DELETE xxxx'
ThanksYou could join SQL_ADDR in v$session with ADDRESS in v$sqlarea to determine the SID that executed that SQL statement last. Note that PREV_SQL_ADDR in v$session will indicate the previous SQL he executed. Though you would have to look at these tables very often to get all SQL statements issued. One note here, I think if a different user ran the SAME SQL with just bind var differences the SQL_AREA will only show the last userâs information that executed it.
BTW - it will show deletes also... -
I have an issue while reading rating data from a SharePoint list using
socialdataservice.asmx. In particular I am trying to get average rating from a remote site using GetRatingAverageOnUrl() method. The issue is, while trying to use this method it return average rating for a particular list item only if current
user have previously rated that particular item else it shows an “object reference not set to instance of an object” error.
While digging in deeper I found that this is actually the case with almost all the rating related functions of
socialdataservice web service (viz. CountRatingsOnUrl, GetRatingsOnUrl, GetRatingAverageOnUrl etc.)
Girish Kumar p Meena
SharePoint Developer || BlogHaving similar issues. Ever find out what is going on with GetRatingAverageOnUrl?
-
I have been trying to access my iCloud account for more than a week...looking to drop it to the 5GB from current 7GB. I always get the same answer any advice appreciated. System Preferences clcik on clous = Account status: An error was returned from server. Please try again later
I have tries later many many times.
Thanks,
SophieI don't know why you can't access it, but if you were a MobileMe subscriber with the free extra storage this has now been removed and your account will have reverted to 5GB.
-
User exit for return from delivery - 651 movemment type in WM
Hi Guru,
We are going to implement a customize program to control the putaway storage location when the HU returning from delivery in WM environment.
The process is as below:
1. Create the return order with reference to the original billing document;
2. Create the return delivery (original storage location is 0001).
3. Manually attached the HU we want to return to the delivery ;
<<<< 4.LT03 to create the TO for this delivery. >>>>>
- then it will automatically PGR (material document with 651 movement type)
- A TO will automatically created and from 904 to another destination storage type 101 (setup in the 651 movement type).
The requirement is: we need to change the storage location when the TO (904 to 101) is confirmed according to some logic.
We found that we can not use the user exit "EXIT_SAPLL03T_001 - User Exit at End of TO Creation (in Update Task)" or 'EXIT_SAPLL03T_002 - User Exit at End of TO Confirmation (in Update Task)". We set the break point, but it didn't stop there.
Any one can help us where we can put our code in?
Thank you very much,Hello!
The user exit MWMTO001 (FM EXIT_SAPLL03T_001) runs usually in Update
Task. That means that you have to switch on the update debugging in
order to let the debugger stop in this exit. In most cases update
debugging isn´t switch on when the debugger doesn´t stop in the exit. -
Reading User Profile Properties pragmatically in SharePoint 2010 Returns Null Values Although it has values returned from AD
I configured the user profile service application and run Sync and user profiles and its properties returned from Active directory but when I want to read it pragmatically it returns null values.
this is my code...
void runQueryButton_Click(object sender, EventArgs e)
// Get the My Sites site collection, ensuring proper disposal
using (SPSite mySitesCollection = new SPSite("http://sp/my"))
//Get the user profile manager
SPServiceContext context = SPServiceContext.GetContext(mySitesCollection);
UserProfileManager profileManager = new UserProfileManager(context);
UserProfile profile = profileManager.GetUserProfile("Contoso\\user");
foreach (Property prop in profileManager.Properties)
// if (prop.Name == "Department")
resultsLabel.Text += prop.DisplayName + ":" + profile[prop.Name].Value + "<br />"; ;Hi,
Please try with the following code
PrincipalContext principalContext = new PrincipalContext(ContextType.Domain);
SPServiceContext context = SPServiceContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(context);
foreach (Property prop in profileManager.Properties)
// if (prop.Name == "Department")
resultsLabel.Text += prop.DisplayName
+ ":" + profile[prop.Name].Value + "<br />"; ;
Thanks,
Vivek
Please vote or mark your question answered, if my reply helps you -
Adding and removing current user from one SharePoint group to another with event receiver
hi friends
i need to change current user from one SharePoint group to another with list item adding event receiver.
please help meHi Malli,
Greetings. Its nt possible
http://sharepoint.stackexchange.com/questions/42286/event-receivers-on-add-remove-users
Please remember to click 'Mark as Answer' on the answer if it helps you -
Hello
In my app (WP 8.1) i have to store user location (lat,lon) in sql db so how can i store that location detail? And i also have to find all the location which are inside certain radius X from another user location, How can i do this?
Any Sample project or code or any blog post?
P.S. I use sql server 2012.If you need to do spatial queries like the one you mentioned you'd need to store it as a spatial geography type. For points, a simple SQL INSERT statement using the Point() method would do it. Example here:
http://msdn.microsoft.com/en-us/library/bb933811.aspx For locations inside a radius, you'd use STDistance() method. All of the methods for the geography data type are documented here:
http://msdn.microsoft.com/en-us/library/bb933802.aspx and can be used in ordinary T-SQL statements.
If you need to use the SQL Server spatial library in your .NET application direct, Alastair has some nice blog posts, like this one:
https://alastaira.wordpress.com/2011/08/19/spatial-applications-in-windows-azure-redux-including-denali/ , he even wrote a book. Or search the answers in this forum.
Hope this helps, Bob
Maybe you are looking for
-
How do I get my Bluetooth keyboard to work again?
So awhile back I spilt water on the keyboard of my 13 inch MacBook Pro. All was fine except for the fact that the keyboard on the computer no longer worked. I got a new wireless bluetooth keyboard and everything was good. My problem is that my comput
-
I upgraded to a new apple mac book pro and now when I try to download to adobe digital edition I receive this error:Error getting License. License Server Communication Problem: E_ACT_NOT_READY
-
How to STARTUP multiple Oracle Databases, using sqlplus (SOLARIS)
Hi guys, I am pretty new at solaris and oracle, right now i have oracle 11gr2 installed in my Solaris 10 machine. I managed to create 2 databases with 2 different ORACLE_SID, (e.g. A & B) my question is, is it possible to have both of this Databases
-
I need to get a cable that will connect my microphones to my camera. I need a stereo 1/8 inch on one end and two mail XLR connectors on the other end, about 6 feet long. Does anyone know where I can get cables made? I have searched and found many cab
-
Yup my first generation G5 shut down twice on Saturday. Couldn't sleep so I got up and turned it on and came to this forum. Saw that I'm not the only one; got directed to the extension repair program page http://www.apple.com/support/imac/repairexten