Posts

Showing posts with the label UWP

Fixed Facebook App login issue "The domain of this URL isn't included in the app's domains"

I have been setup and use the Facebook login successfully i my UWP app for sometime. But recent it was failure with error " Can't load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings " when I running the app in "Release" mode in Visual Studio. I am using URL " https://www.facebook.com/v2.12/dialog/oauth?client_id=<XXXX>&redirect_uri=ms-app://{ Windows Store SID }&display=popup&response_type=token&state=1&scope=email ", I found the redirect_uri value which got from the code "WebAuthenticationBroker.GetCurrentApplicationCallbackUri().AbsoluteUri" is changed and not the sane value in the Facebook App setting's Windows Store ID. So I updated the new value to App Settings and then run above URL again, it works! Login to Facebook successfully. By the way, I used "https...

Resolve "System.Reflection.MissingMetadataException" when running UWP app in release mode

Image
I had been seen an issue "System.Reflection.MissingMetadataException" when running a UWP app in release mode. It was failure at the code: public static MobileServiceClient MobileService = new MobileServiceClient(" "); I turn on the "Compile with .NET Native tool chain" option in property of project settings as below screen shot, and then run the app in Debug mode. This time it throws more details of error "'Microsoft.WindowsAzure.MobileServices.PlatformInformation' is missing metadata. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=392859". I went to that link of page and also search it in google.  Now knew it was caused by the  ".NET Native does not presently have a just-in-time compiler to compile the pieces that are missing, everything that can be accessed at runtime needs to be known at the time of compilation". The reflection of mobile service can not be determined statically at the tim...

Windows.Security.Authentication.Web.WebAuthenticationBroker.AuthenticateAsync throws error "value does not fall within the expected range."

I used Windows.Security.Authentication.Web.WebAuthenticationBroker.AuthenticateAsync to perform Facebook authentication and it always works well. Refer to article https://docs.microsoft.com/en-us/uwp/api/windows.security.authentication.web.webauthenticationbroker However, it didn't work and throws error message "value does not fall within the expected range." recently. I verified the call back URL from " WebAuthenticationBroker.GetCurrentApplicationCallbackUri().AbsoluteUri" and found out that the Windows App Id is changed! So I updated the related Windows App Id in the Facebook App setting's configuration page, and now the authentication works again!

UWP - Centralize the Command Bar Menu in the page

The Command Bar Menu is located on the left side of the page by default. But I need to move it to the central location in the page. To do so, I have to modify the style XML of Command Bar.  Under "<Style TargetType="CommandBar">...." , located this line " <ItemsControl     x:Name="PrimaryItemsControl" " and then change it as below: <ItemsControl     x:Name="PrimaryItemsControl"     HorizontalAlignment="Center"     MinHeight="60"      IsTabStop="False"      Grid.ColumnSpan="2"> Afterwards, you can see the Command Bar Menu is located on the central of the page.

Could not load file or assembly 'Newtonsoft.Json'..." error causes Azure Push Notification initinalize failure in Windows Appp

I have been received the error "HTTP 400, bad request" when calling Azure Push Notification initialised function for few days. It was working fine previously and I didn't change any configuration on it. I checked the "diagnostics logs" in Azure Mobile App service and found the issue related to below error message. Could not load file or assembly 'Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) I researched above issue in Google and then updated the latest version of "Newtonsoft.Json" in my Azure Mobile App .NET back-end application. The issue was gone and I can calling Azure Push Notification service in my mobile App successfully!

Debugging the wrong line in UWP (Universal Windows App) in Visual Studio 2015

I had met a debugging issue which ran into the wrong line such as comments line when debug a referenced .Net project in UWP (Universal Windows App) in Visual Studio 2015. I search around in google and saw some suggestions that convert the source code to ANSI format but it didn't resolve the issue. It took me few hours to found out the Windows Desktop UWP project referenced to the .Net project which was not from the latest build output path "bin\x86\Debug\". Actually it points to path "\bin\ARM\Debug" because it needed debug in "ARM" platform when deploying the Windows phone project to windows phone . I was debugging the wrong project before!!!!     After I refer to the correct project reference, I was able to debug code as normal as usual. :)

Fxied error "DEP0001 : Unexpected Error: -1988945906" while deploying Windows UWP app to a windows phone

I had met a error message "DEP0001 : Unexpected Error: -1988945906" while deploying Windows UWP app to a windows phone. I search the error message in google and then found out a command line " net start IpOverUsbSvc " to resolve the issue. But I still got the same error when deploying the app, and so I power off the phone and then start it again. I try the deploying again (make sure the phone is unlock), and it ran well. The issue was gone!  

A real time Notification App to engage the business promotion with customer in a personalized, cost effective and interactive way

Image
Today’s reality is that the average person is: Bombarded with hundreds of emails  Time-poor has not got the time to read emailed advertising materials As a business marketer, your  email promotional activity needs to produce positive results. Your online promotional strategies need to break through the cyber-clutter to become more profitable and more successful. This is why I come up with an App idea to engage the business promotion with customer in a more personalized, cost effective and interactive way by using interactive notification message and Facebook chat-bots. Below are the screenshot of notification message on desktop and chat-bots. I worked with Madhan K from Qantas in "AngelHack Sydney 2016" event recently to make a Notification App provides subscription services to customers to subscribe and receive the push notification of latest promotion from a most popular business around the customer area based on the real time number of Optus mobile us...