I am trying to set a background for my app's tile using these instructions. However, it still shows the default spiky circle image. (I think it's "ApplicationIcon.png".)
Here is my WMAppManifest.xml:
<Tokens>
<PrimaryToken TokenID="MyAppToken" TaskName="_default">
<TemplateType5>
<BackgroundImageURI IsRelative="true" IsResource="false">s.png</BackgroundImageURI>
<Count>0</Count>
<Title>My App Title</Title>
</TemplateType5>
</PrimaryToken>
</Tokens>
What could I be doing wrong? s.png is set to build action "Content".
There are two icon files. They default to ApplicationIcon.png and Background.png
ApplicationIcon is 62x62, can't be transparent and is used it the list view of applications.
Background, which is what you are setting here should be 173x173, can be transparent, and it used when you pin the application to the start screen.
So my first suggestion would be to check you are actually setting the image you think you are and are looking at the start screen not the list view.
My second would be to check the image sizes are correct. I do not know what the phone does if they are not.
My third would be to check the image you are referencing is in the top level of the project, not in a folder, and is actually making it into your xap. Go into the bin\debug or bin\release then open the .xap file with a zip client and make sure it is there.
Sometimes WP7 seems to cache the old image - so my advice would be:
if you are using the phone, then remove your app (using press and hold to bring up the menu)
if you are using the emulator, then reboot it to ensure the app is completely removed
Related
The title says it all.
All images in the platforms/windows/images folder are png files with transparent background, but when I build the app package it becomes gray. Like in the image below.
Is there a way to make my cordova UWP app have a dynamic background that matches the windows theme just like "skype" does.
Files in platforms/windows/images directory
SplashScreen.scale-100.png
SplashScreenPhone.scale-240.png
Square150x150Logo.scale-100.png
Square150x150Logo.scale-240.png
Square30x30Logo.scale-100.png
Square310x310Logo.scale-100.png
Square44x44Logo.scale-100.png
Square44x44Logo.scale-240.png
Square70x70Logo.scale-100.png
Square71x71Logo.scale-100.png
Square71x71Logo.scale-240.png
StoreLogo.scale-100.png
StoreLogo.scale-240.png
Wide310x150Logo.scale-100.png
Wide310x150Logo.scale-240.png
UPDATE:
After reading Dave Smits answer I realized that background color on start menu is defined in cordova generated .appxmanifest file. I edited it manually and changed the element uap:VisualElements attribute BackgroundColor to "transparent" and generated package had a background color of current theme as I asked.
Next step is to change that BackgroundColor property from cordova config.xml, because it will be deleted next time cordova decides to generate a new .appmanifest file
in your manifest you define a color too; make this transparent too
to do directly in cordava add this to your config.xml
<preference name="BackgroundColor" value="0xff0000ff"/>
I am trying to create a tile icon for the windows 8.1 using the guide provided by Microsoft here. I have done everything they are asking me to do there but I am still not seeing the Tile Icon. Has this worked for anyone? can someone please help? It is picking my brain and can't sleep!!! Please help!
http://msdn.microsoft.com/en-us/library/windows/apps/dn393983.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/jj673981
<Application xmlns:xsi="w3.org/2001/XMLSchema-instance">;
<VisualElements BackgroundColor="#FFFFFF" ShowNameOnSquare150x150Logo="off" ForegroundText="light" Square150x150Logo="Assets\150x150Logo.png"/>
</Application>
Your visual manifest only specifies a 150x150 image. You need to specify both:
Important If you opt for a custom image, you must specify an image
for both the Square150x150Logo and Square70x70Logo attributes. If you
specify only one of those attributes, this entire XML file is ignored
and the default styling (app icon and background) is applied to the
tile.
I created a sample and specified both images, and it works fine for me.
Also, don't forget to refresh the shortcut:
Step 7: Important! Refresh your shortcut file
If your app is already installed, you must nudge your shortcut after
the new or updated .VisualElementsManifest.xml is in place or it will
be ignored.
I'm starting my first PhoneGap project and am developing using Visual Studio and Windows Phone 7, although I intend on ultimately deploying to iOS and Symbian as well.
However, I'm stuck at Step 1. I have added an image to the www/images folder, and put the following code:
<img src="images/login-btn.png" width="103" height="42" style="margin-left:90px;" />
And I get:
It works fine when I preview it in IE9, but I don't have a Mac to test it on iOS yet.
It's worth noting that the JS files and CSS have loaded fine, it's just any image (whether referenced in CSS or an <img> tag) always comes up broken.
My guess would be the Build Action of your image file is incorrect.
According to http://wiki.phonegap.com/w/page/48672055/Getting%20Started%20with%20PhoneGap%20Windows%20Phone%207#4Reviewtheprojectstructure section 4. You should be setting the Build Action of your images etc to Content which simply copies them into the output project when it is built. They are probably currently set to Resource or None.
To change the Build Action right click a file and choose properties to go to the properties window if you do not already have it open. It is probably then the first property. Just click and choose the correct one.
I'm posting this to questions that I found while trying to find my answer to the same problem. The JS framework I use adds a url query to each image when in a debugging mode (in order to force browsers to reload image, instead of using cached). So, my image "image/background.jpg" would be accessed as "image/background.jpg?d=34342233". But, when running on PhoneGAP for Windows Phone, it won't recognize the image, and thus it shows up as broken. So, I had to turn off debugging for the framework I use, and suddenly the images showed up (still, don't forget to set the Build Action to "Content" as mentioned earlier).
I've got a background image which contains the title of my application already. I don't want to display the Windows Phone title on the tile -- because displaying it there covers up the content I want to show.
Several Windows Phone applications, such as Office, don't display any title at all on their live tile. But if you try to enter a blank name for the live tile, Visual Studio complains at you.... forcefully.
Is not showing a separate title layer something that's only available to Microsoft or something like that?
From this thread.
I haven't used it before, but the person who posted the solution says it worked and got approved for the Marketplace.
In WMAppManifest.xml file in the 'Properties' folder of the project, replace the contents of the element of with 2 or 3 spaces. This compiles without errors and displays without the app's name in the 'Start' page when you pin it.
<TemplateType5>
<BackgroundImageURI ... ... ...>Background.png</BackgroundImageURI>
<Count>0</Count>
<Title> </Title>
</TemplateType5>
You can give the tiles a blank title. I do this frequently for my apps, and many popular apps such as the Amazon Kindle app do this too.
Although this can't be done directly in the 'property editing' mode of the project, you can edit the WMAppManifest.xml directly and you will be able to remove the title. To do this, simply remove the title between the tags and the project will still compile. See the XML below (I have omitted a chunk of the XML for conciseness):
...
<BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
<Count>0</Count>
<Title></Title> <-- This is the element you need to leave blank
</TemplateType5>
</PrimaryToken>
</Tokens>
</App>
</Deployment>
Put a full stop in as the title. Bit of a cheat but looks OK.
I have an iPad application which has many categorized images I need to switch between.
I store the categories in a database, along with the image prefix and number of images for that category. Using a random number in the range of 0-to-image_count_for_category, I get an image name like this:
[image_prefix][random_number].png => "SomeCategory3.jpg"
The images themselves are included in the project file structure and are not stored in the database.
All the image swapping is going fine. The problem lies in some of the image usage... I used to have an image "SomeCategory3.jpg", which was in the application, and has been displayed. Now, I replace the image named SomeCategory3.jpg, and the old image shows up ... Um ... how is that possible?
I have tried removing the app from the device, cleaning the project, re-building, and re-copying to the device for debug. Still, the old image comes up in that random rotation.
My app never copy the images anywhere. I simply reference them using the app folder with the image name appended.
I have verified that the old images are not in the folder or referenced by the project. I have viewed all the images in xcode to ensure the image displays properly.
Yet somehow ... the old image gets used in my random image swapping rotation.
It's driving me mad trying to figure out how the old image is there.
Any ideas?
Thanks!
Kevin
Xcode can't tell the image changed and did not overwrite the one in your app bundle's Resources folder. Right-click the image in your Xcode project and click "Touch" then rebuild. That or clean your target and rebuild.