SocketActivityTrigger and pushNotifications - windows-runtime

Why I need to check pushNotifications capability, when I use SocketActivityTrigger? What is the purpose of it?

You don't.
Push notification capability (ID_CAP_PUSH_NOTIFICATION) is for Windows Phone 8/8.1 Silverlight.
Both Windows Runtime 8.1 and UWP (Windows 10) do not have a push notifications capability, see the list of all capabilities in UWP.
If you check the official sample for SocketActivityTrigger, you'll see it only uses capabilities for internet connectivity.
<Capabilities>
<Capability Name="internetClient" />
<Capability Name="privateNetworkClientServer" />
</Capabilities>

Related

How to set HttpCookie Samesite attribute in .Net framework 4.0.30319?

I'm currently using .Net framework 4.0 in my application. Upon checking i could see that the samesite attribute is available only from .Net framework 4.7.2 version(https://learn.microsoft.com/en-us/dotnet/api/system.web.httpcookie?view=netframework-4.0). Can anyone please let me know how to set samesite=None without upgrading the .Net version or How to handle samesite cookie in .Net version 4.0
Despite what Microsoft's documentation currently says about the minimum version, it does work on .NET 4.0, at least if you do it in your config file. Example:
<system.web>
<sessionState cookieSameSite="None" />
</system.web>

FileTypeAssociation for WIndowsPhone 8.1

I have the following settings in my Windows Phone 8.0 app manifest :
<Extensions>
<FileTypeAssociation Name="My application File Type" TaskID="_default" NavUriFragment="fileToken=%s">
<SupportedFileTypes>
<FileType>.myapp</FileType>
</SupportedFileTypes>
</FileTypeAssociation>
<Protocol Name="abc" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" />
<Protocol Name="abcs" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" />
</Extensions>
I want similar auto launch of the application for .myapp type files in my Windows Phone 8.1 app. However, when I try the same code there it says TaskID and NavUriFragment are not supported. Any suggestions?
By Windows Phone 8.1 app I'm assuming that you mean a Universal App. In that case you are going to want to change the registration to a FileType Registration.
<Extension Category="windows.fileTypeAssociation">
<FileTypeAssociation Name="test">
<DisplayName>My App Type</DisplayName>
<InfoTip>This was created by my app</InfoTip>
<SupportedFileTypes>
<FileType ContentType="x-application/myapp">.myapp</FileType>
</SupportedFileTypes>
</FileTypeAssociation>
</Extension>

CaptureElement was not found , missing assembly reference

I am using Visual Studio 2013 Express, developing new camera app for windows mobile 8.1 , getting error :
<CaptureElement x:Name="myCaptureElement"
HorizontalAlignment="Left"
Width="320" Height="240" />
CaptureElement was not found, missing assembly reference . .
As you have mentioned, you are targeting WP8.1 Silverlight - and as MSDN says, CaptureElement class is olny for Runtime:
Windows Phone 8.1 [Windows Runtime apps only]
If you need to take a photo in Silverlight, you may think of using Camera Capture Task, which:
Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 | Windows Phone OS 7.1
You may also have a look at this nice article.

Why I can't create a file in pictures library successfully based on Windows Phone Silverlight 8.1?

In my WP Silverlight 8.1 App, the following codes would throw a UnauthorizedAccessException, and tell me that Access is denied, but it works very well on Universal Apps.
StorageFolder storageFolder = KnownFolders.PicturesLibrary;
StorageFile file = await storageFolder.CreateFileAsync("mytest.dat", CreationCollisionOption.ReplaceExisting);
To access the pictures library on Windows Phone 8.1 you must have the following capability in your package.appxmanifest file:
<Capabilities>
<Capability Name="picturesLibrary" />
</Capabilities>
Given that you already have enabled ID_CAP_MEDIALIB_PHOTO, my guess is that in WP81 Silverlight you need to use Microsoft.Xna.Framework.Media.MediaLibrary.SavePicture.

Unity 2.1 configuration

I'm trying to find any documentation on Unity configuration but it now seems that this is only available up to version 2.0? I'm getting version 2.1 through NuGet and the configuration just seems to be different...
e.g. <register /> is done using <type /> in Unity 2.1? Is there any documentation available on Unity 2.1 configuration?
Unity 2.0:
<register type="IInterfaceAlias" mapTo="ClassAlias">
<lifetime type="singleton" />
</register>
Unity 2.1:
<type type="IInterfaceAlias" mapTo="ClassAlias">
<lifetime type="singleton" />
</type>
Thanks for clearing up anybody!
Unity 2.1 is just a maintenance release. Nothing changed regarding how to configure the container from v2.0