winrt-component

Toast notification & Geofence Windows Phone 8.1

拜拜、爱过 提交于 2019-12-05 17:05:18
I'm facing a strange problem with my Windows Phone 8.1 App. The App will send a toast notification every time the user is near a Point of his interest using Geofence Quickstart: Setting up a geofence and BackgroundTask Quickstart: Listening for geofence events in the background And this is the Background task (example) public void Run(IBackgroundTaskInstance taskInstance) { // Get the information of the geofence(s) that have been hit var reports = GeofenceMonitor.Current.ReadReports(); var report = reports.FirstOrDefault(r => (r.Geofence.Id == "id") && (r.NewState == GeofenceState.Entered));

Convert Platform::String to std::string

自古美人都是妖i 提交于 2019-12-01 00:15:21
I am getting String^ which Contains some Indian language characters in a callback from C# Component in my C++ WinRT Component in a Cocos2dx game for Windows Phone 8 project. Whenever I convert it to std::string the Hindi and other characters turn in to garbage characters. I'm not able to find why this is happening. Here is a sample code and I have just defined Platform::String^ here but consider it's passed to C++ WinRT Component from C# Component String^ str = L"विकास, વિકાસ, ਵਿਕਾਸ, Vikas"; std::wstring wsstr(str->Data()); std::string res(wsstr.begin(), wsstr.end()); Peter Torr - MSFT Edit:

Convert Platform::String to std::string

时间秒杀一切 提交于 2019-11-30 18:09:14
问题 I am getting String^ which Contains some Indian language characters in a callback from C# Component in my C++ WinRT Component in a Cocos2dx game for Windows Phone 8 project. Whenever I convert it to std::string the Hindi and other characters turn in to garbage characters. I'm not able to find why this is happening. Here is a sample code and I have just defined Platform::String^ here but consider it's passed to C++ WinRT Component from C# Component String^ str = L"विकास, વિકાસ, ਵਿਕਾਸ, Vikas";