Multi Device Hybrid App for Windows Phone: How to set the logo? - windows-phone-8

I am trying to figure out, how to set the app logo as well as the splashscreen using the preview for cordova apps (or Multi-Device Hybrid Apps) in Visual Studio 2013. I tried adding
<platform name="wp8">
<icon src="img/logo.png" width="99" height="99" />
<!-- tile image -->
<icon src="img/logo.png" width="159" height="159" />
</platform>
However this won't do the trick. It's a pretty new thing so finding informations on this topic is kind of hard. It was pretty easy, using the old method. Any help is appreciated.

Multi-Device Hybrid apps use the Cordova CLI to build for each platform, which provides a fallback by default, so you don't actually need to add a reference in your HTML files.
Instead, to set a logo (I assume you're talking about the icon that shows up in the app drawer), you need to add(or replace) the image in res/icons/wp8/ by following the resolution and naming guidelines mentioned in "Platform-specific Visual Assets" section of the docs.

Switch to wp8.1 emulator instead of wp8 emulator.

Related

Blazor Maui App is Not Displaying Images that are in a Razor Class Library project

The images are referenced in a razor component that's defined in a Razor Class Library in the "wwwroot/Images" folder.
I've included a project reference to this Razor Class Library in my Blazor Maui Client App.
The problem I'm having is that the image is not showing up.
Initially I had it as:
<img src="../wwwroot/Images/CISA_Logo_183px.png" />
then I tried:
<img src="_content/CSETRazorClassLibrary/wwwroot/images/CISA_Logo_183px.png" />
and I'm not having any luck getting the image to display.
Is there something else I need to configure in the Blazor Maui app to make this work?
I'm using Visual Studio 2022 Preview Version 17.3.0 Preview 3.0 and I'm on a Windows 11 Pro Version 21H2
The src is wrong. _content/CSETRazorClassLibrary/ is the wwwroot folder of the RCL. So the path should be _content/CSETRazorClassLibrary/images/CISA_Logo_183px.png . Here is a test I ran up to illustrate the path resolution.
<img src="_content/RazorClassLibrary1/background.png" />
#page "/"
#using RazorClassLibrary1
<h1>Hello, world!</h1>
<Component1 />
Turns out after I updated Visual Studio I was able to get it to work. So it appears that the version I had was the reason I could not see the image.

Windows phone 8.1 tiles issues

I am currently working on an application that was developed using windows phone 8.0 sdk and and i targeted it to work with Wp8.1 SDK. Everything is working fine, apart from the issue with tiles. For some reason, it is taking the WMAAppmanifest settings into consideration instead of the Package.appxmanifest file.
here's my Application tag in the Package.appxmanifest file,
<Applications>
<Application Id="xxxxxxxxxxxxxxxxxx" Executable="AGHost.exe" EntryPoint="/Views/SplashScreen.xaml">
<m3:VisualElements DisplayName="SampleUI" Square150x150Logo="Assets\SquareTile150x150.png" Square44x44Logo="Assets\Logo.png" Description="SyncUI" ForegroundText="light" BackgroundColor="#464646">
<m3:DefaultTile Square71x71Logo="Assets\SquareTile71x71.png">
</m3:DefaultTile>
<m3:SplashScreen Image="Assets\Splashscreen.png" />
</m3:VisualElements>
<Extensions>
<Extension Category="windows.backgroundTasks" EntryPoint="ScheduleSync.TimerTriggerTask">
<BackgroundTasks>
<Task Type="systemEvent" />
<Task Type="timer" />
</BackgroundTasks>
</Extension>
</Extensions>
</Application>
</Applications>
The tile doesn't seem to change irrespective of what i change the image to be.
Am i looking at the right place? Is there some other place where i need to change the tiles ?
I had to change the tile in the WMAppmanifest instead of the Packageappxmanifest.
Here's the sample,
<Tokens>
<PrimaryToken TokenID="Token1" TaskName="_default">
<TemplateType5>
<BackgroundImageURI IsRelative="true" IsResource="false">Images\Cloud_WP8_71x71.png</BackgroundImageURI>
<Count>0</Count>
<Title>Sample Cloud</Title>
</TemplateType5>
</PrimaryToken>
</Tokens>
Double Click on the Package.appxmanifest in the Solution Explorer of your project. It will load up a GUI for updating the App manifest rather than using the xml versions.
In the GUI representation there will be a 'Visual Assets' Tab at the top which will let you set each of the different tiles.
Here is a link to a video of how to use the Package.appmanifest file. It also talks about hwo to set the tiles of the app. http://channel9.msdn.com/Series/Windows-Phone-8-1-Development-for-Absolute-Beginners/Part-8-Working-with-the-package-appxmanifest

Cordova - Windows Phone 8, camera.getPicture + view image in <img /> tag?

I am not sure how to resolve externally obtained images (A.K.A via Camera/PhotoLibrary)
<img src="///myAppFolder/photoTaken.jpg" />
I did this on other platforms (Android + iPhone) by resolving the local-storage via window.requestFileSystem(); and appending the correct folder path (which looked much more absolute than what window phone provides - it only ever returns a relative path) and it works, however I am uncertain what to do in this case on the windows phone solution.
Using Cordova 2.5.0
Ah! How silly of me, after mucking around for several hours then ending up posting I found the solution to my issue :) I was using toURI() when I shouldve been using toURL() after resolving. All turned out to be well!

How to set Silverlight 5.1 as requirement for a Website?

When you develop a Silverlight app and want to embed in a HTML you do something like this:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="1345px" height="667px">
...
<param name="minRuntimeVersion" value="5.0.61118.0" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="textdecoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
The problem is there's a bug that prevents a OOB App to update itself
(Source: http://www.microsoft.com/getsilverlight/locale/en-us/html/Microsoft%20Silverlight%20Release%20History.htm#SL_5_1_10411)
The bug is fixed in v5.1.x however, when I develop in Visual Studio, it always setup the web page for 5.0.x as shown above.
It is NOT as simple has changing the values minRuntimeVersio to 5.1.x.. I tried that as well as modify the link with the param &v=5.1...., it does not work, as test I can even "require" 5.2 which does not even exists and the link does not show invalid request.
Any idea how to ensure the users will have the most up-to-date plugin?
It works for me. You don't need to include the minor version number, "5.1" is enough. I can't check with 5.0, but if I set it to "5.2", I get a "This page requires a more recent version of Silverlight" dialog. The version number in the link doesn't do anything. The linked-to page always downloads the latest version (for obvious reasons).
<param name="minRuntimeVersion" value="5.1"/>

Windows Phone 8: How to set Image on the fly

Windows Phone 8 :
I have an HTML design to bind in webbrowser control.
In that HTML I need to set the image() dynamically from my windows 8 phone application itself (Eg:MyApp/Images/Done.png).
How to set this Image in my HTML dynamically?
Could any one help me on that?
In terms of Zen, WP8 tried to align Uris as close as possible to Win8 Uris. So whenever you ask yourself "How do WP8 Uris work?" a good starting point would be Win8 and WP7 behaved. For example, you'll see lots of "ms-appx:///" and "ms-appdata:///" all around WP8.
Specfically, In order to access an app's Image resources from a WebBrowser just specify the local file path.For example, start a new WP8 project and in MainPage.xaml add:
<phone:WebBrowser Source="myPage.html" />
And create myPage.html and add:
<html>
<body>
<img src="Assets/AlignmentGrid.png"/>
</body>
</html>
This would render the correct image as part of the WebBrowser. See attached .