I have defined IconicTile Template as default tile for my Application. Now I wish to update my tile with the notification count. So I have sent following parameters for the update:
backgroundColor,
count,
title,
iconImage,
smallIconImage,
wideContent1,
wideContent2,
wideContent3
Tile update works fine on the test device running on windows phone 8.1 but its not coming up on device and emulators running on windows phone 8.0. What am I missing here? Please help
Are you targeting your application for WP8 or WP8.1?
Try adding this snippet in your class.
IconicTileData TileData = new IconicTileData()
{
Title = "[title]",
Count = [count],
WideContent1 = "[1st row of content]",
WideContent2 = "[2nd row of content]",
WideContent3 = "[3rd row of content]",
SmallIconImage = [small Tile size URI],
IconImage = [medium/wide Tile size URI],
BackgroundColor = [.NET color type of Tile]
};
Hope this live tile is not updating in Windows Phone helps.
Related
I need current display resolution. How can i get this? I know about Window.Current.Bounds, but application can worked in windows mode.
what do you mean VisibleBounds is not working on Deskptop?
I tried in my win10 UWP program, it works fine. I can get my desktop resotion like below:
var bounds = ApplicationView.GetForCurrentView().VisibleBounds;
var scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
var size = new Size(bounds.Width * scaleFactor, bounds.Height * scaleFactor);
Besides, if you are using DX in store app, you can create an IDXGIFactory object and use it to enumerate the available adapters. Then call IDXGIOutput::GetDisplayModeList to retrieve an array of DXGI_MODE_DESC structures and the number of elements in the array. Each DXGI_MODE_DESC structure represents a valid display mode for the output. e.g.:
UINT numModes = 0;
DXGI_MODE_DESC* displayModes = NULL;
DXGI_FORMAT format = DXGI_FORMAT_R32G32B32A32_FLOAT;
// Get the number of elements
hr = pOutput->GetDisplayModeList( format, 0, &numModes, NULL);
displayModes = new DXGI_MODE_DESC[numModes];
// Get the list
hr = pOutput->GetDisplayModeList( format, 0, &numModes, displayModes);
Please let me know if you need further information.
I'm creating winrt universal project for mobile and tablet.
I want to check:
In mobile application, I am sending a sms text to sms application like this.
var message = new ChatMessage();
message.Recipients.Add("9999");
message.Body = "R*" + voucherNo + "*" + accountNo + "*" + pin;
await ChatMessageManager.ShowComposeSmsMessageAsync(message);
I want to place a check above that whether user has inserted sim card or using mobile with out sim card. Well app is not crashing due to this so this is not a big issue if I couldn't place that check here (as I have already searched alot about it but got nothing so I'm assuming that it is not possible right not in winrt to check sim card availability), but a link of documentation/blog/SO question regarding this where it is mentioned that you can't check sim card availability would be helpful.
Thanks.
bool simAvailable = false;
var device = await ChatMessageManager.GetTransportsAsync();
if (device != null && device.Count > 0)
{
foreach (var item in device)
{
if (item.TransportFriendlyName != "No SIM")
{
simAvailable = true;
break;
}
}
}
Just enter this code and Simavailable will be true if phone hase sim card.
How do I set the color of the main icon of a live tile in a Windows Phone app? By default Windows Phone 8 sets it to a black and white.
I want to set the icon to a color like red, similar to how the Evernote tile has its icon in gray. Anyone knows how to do this?
Thanks!
The documentation provides info about this: Iconic Tile template for Windows Phone 8
XAML
<?xml version="1.0" encoding="utf-8"?>
<wp:Notification xmlns:wp="WPNotification" Version="2.0">
<wp:Tile Id="[Tile ID]" Template="IconicTile">
<wp:SmallIconImage [Action="Clear"]>[small Tile size URI]</wp:SmallIconImage>
<wp:IconImage Action="Clear">[medium/wide Tile size URI]</wp:IconImage>
<wp:WideContent1 Action="Clear">[1st row of content]</wp:WideContent1>
<wp:WideContent2 Action="Clear">[2nd row of content]</wp:WideContent2>
<wp:WideContent3 Action="Clear">[3rd row of content]</wp:WideContent3>
<wp:Count Action="Clear">[count]</wp:Count>
<wp:Title Action="Clear">[title]</wp:Title>
<wp:BackgroundColor Action="Clear">[hex ARGB format color]</wp:BackgroundColor>
</wp:Tile>
</wp:Notification>
C#
IconicTileData TileData = new IconicTileData()
{
Title = "[title]",
Count = [count],
WideContent1 = "[1st row of content]",
WideContent2 = "[2nd row of content]",
WideContent3 = "[3rd row of content]",
SmallIconImage = [small Tile size URI],
IconImage = [medium/wide Tile size URI],
BackgroundColor = [.NET color type of Tile]
};
In peiodic task i set iconic tile:
var tile = ShellTile.ActiveTiles.FirstOrDefault();
if(tile!=null)
tile.Update(new IconicTileData{ Count= 1, IconImage=..., SmallIconImage=..., Title="test"});
It works, and i see "1" on tile.
After that, in mainpage of app at startap i'm trying to clear it like(without count):
var tile = ShellTile.ActiveTiles.FirstOrDefault();
if(tile!=null)
tile.Update(new IconicTileData{ IconImage=..., SmallIconImage=..., Title="test" });
Then i exit app, but "1" remains on tile, why? No exception thrown.
While updating the tile, if you want count not to be displayed, set count=0
I'm validating the Tabris framework at the moment and stumbled about a few indication errors when I tried the UI Control Code Snippets.
I added the VisualGuideDemo.java to my HelloWorld-Project and added a table to the display with the createTable function. In my browser it is displaying the expected output with 3 columns and 128 rows. When I test the application on an IPad mini or the IPhone Simulator ...
only the first Column is displayed,
it is not possible to scroll through the whole list (i can scroll about 60 items down, then the list "jumps" back)
and the width of the table does not adjust to the fullwidth of the screen.
See attached Screenshots
I also tried to add a TabFolder which uses the full width of the screen. I used the 'createTabFolder' method:
private void createTabFolder() {
final Shell shell = new Shell( display, SWT.NONE );
shell.setLayout( new FillLayout() );
final TabFolder tabFolder = new TabFolder( shell, SWT.NONE );
final TabItem tab0 = new TabItem( tabFolder, SWT.NONE );
tab0.setText( "Tab0" );
final TabItem tab1 = new TabItem( tabFolder, SWT.NONE );
tab1.setText( "Tab1" );
final TabItem tab2 = new TabItem( tabFolder, SWT.NONE );
tab2.setText( "Tab2" );
//shell.setSize( 300, 100 );
shell.open();
}
I uncommented the setSize function, but the TabFolder does not adjust to the full width of the screen (not in browser or on iOS device).
I'm new to SWT, RAP/Tabris so I am wondering if I miss something basic.
EDIT:
I guess several columns in one table are not supported in the mobile clients, but maybe it would be a nice feature to add the missing columns to the end of the list, seperated by listdividers. Is my assumption correct?
I found the solution to the width problem, I just had to call shell.setMaximized(true);