I am in the process of porting an app from windows phone 8 silverlight to windows phone 8.1 runtime.
Before I could create reminders like this:
Reminder reminder = new Reminder(name);
reminder.Title = titleTextBox.Text;
reminder.Content = contentTextBox.Text;
reminder.BeginTime = beginTime;
reminder.ExpirationTime = expirationTime;
reminder.RecurrenceType = recurrence;
reminder.NavigationUri = navigationUri;
// Register the reminder with the system.
ScheduledActionService.Add(reminder);
How would I do this in windows phone 8.1 runtime?
Thanks,
unfortunately there's no equivalent for Windows phone 8.1 runtime
Migrating your Windows Phone 8 app to a Windows Runtime XAML app
Now you must use toast notifications using the new Action Center feature
MSDN Reference
Action Center QuickStart
Related
I am developing a Windows Phone 8.1 Application and there is a need to get the Application Process ID from code. Any API with which I can get that?
You can use GetCurrentProcess followed by DuplicateHandle (and later CloseHandle) but I'm curious what you need it for... there's not much you can do with it in a Store app so maybe this won't complete your scenario.
Finally got the solution.
The Dll's for Desktop apps and Phone apps are different though the function names will be same.
When tried to import Kernal.dll lib in WIn Phone 8.1 and used p/invoke code, an exception, DllNotFoundException will be thrown. Instead in Win Phone 8.1 instead use "api-ms-win-core-processthreads-l1-1-1.dll"
To get the process ID in Win Phone 8.1 :
1)Create binding to WIN32 lib:
[DllImport("api-ms-win-core-processthreads-l1-1-1.dll", CharSet = CharSet.Unicode, ExactSpelling = false, PreserveSig = true)]
internal static extern uint GetCurrentProcessId();
2)Call the function:
uint id= GetCurrentProcessId();
For the complete set of Win Phone 8 supported API's see the MSDN link:
https://msdn.microsoft.com/library/windows/apps/jj662956(v=vs.105).aspx#BKMK_ListofsupportedWin32APIs
In Windows Phone 8.0 i used this to open an app on the store
MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentIdentifier = "**************";
This Class does not exists in WP 8.1 how can i do?
Thanks
You should use the new launchers.
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:navigate?appid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"));
So when I was watching this video from BUILD I thought it's gonna be easy...
But I can't seem to get the tile of my WP Silverlight 8.1 app to change by doing the following.
const string xml = "<tile>"
+ "<visual>"
+ "<binding template='TileSquareText01'>"
+ "<text id='1'>testing 123</text>"
+ "</binding> "
+ "</visual>"
+ "</tile>";
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xml);
var tileNotification = new TileNotification(xmlDoc);
TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
Please note I've also created a Windows RunTime Windows Phone 8.1 with exactly the same code and it works just fine.
On msdn, it clearly states that TileUpdateManager supports Windows Phone Silverlight 8.1. So I don't really know what's missing here.
In your manifest, make sure the notification type is set to WNS. If you set it to MPNS, then you have to use notifications the old way.
More information here: http://msdn.microsoft.com/en-us/library/dn642085(v=vs.105).aspx
in my Silverlight Windows Phone 7/8 projects I always used these methods/classes to get informations about the user phone:
Microsoft.Phone.Info.DeviceStatus.DeviceFirmwareVersion;
System.Environment.OSVersion.Version;
Microsoft.Phone.Info.DeviceStatus.DeviceName;
Microsoft.Phone.Info.DeviceStatus.DeviceManufacturer;
But now in Windows Phone 8.1 runtime they are missing. Are there some alternatives? My app doesn't use networking.
Thanks and sorry for bad english.
You can use the EasClientDeviceInformation class
e.g.
var deviceInfo = new EasClientDeviceInformation();
var manufacturer = deviceInfo.SystemManufacturer;
var name = deviceInfo.SystemProductName;
var firmwareVersion = deviceInfo.SystemFirmwareVersion;
var osVersion = "8.1"; // Only 8.1 so far. No os version method exists afaik in 8.1
Universal/WinRT apps only work in wp 8.1, so the OS version can only be 8.1. When they make wp8.2 or wp9, they'll probably add a way to check what OS version is installed...
If you're looking for the firmware version, you can get it with:
Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
var firmwareVersion = deviceInfo.SystemFirmwareVersion;
I am working on a worklight App using it's default 1.9 Dojo Toolkit. My App is working fine in Android emulator and in the web browser simulator. I tried to test the same app in Windows phone 8 Emulator but I am not able to see the whole Home page. I can see only Tabbar Button part used at the button while I am not able to see the list items used in the page. My Question is does Dojo Toolkit 1.9 supports Windows Phone 8?
I have visited dojo 1.9 release link and It says that in dojo 1.9, support for Windows Phone 8 has been included. If this is true, What could be the reason of failure for my app in Windows phone 8 emulator?
I also got below log when I created Windows phone 8 environment in my Worklight Project.
[2013-11-12 22:14:08] Environment 'Windows Phone 8' was created.
[2013-11-12 22:14:13] Starting build process: application 'KaiserTestApp', environment 'windowsphone8'
[2013-11-12 22:14:28] Windows Phone 8 app may not work well with Dojo toolkit included for this Application. Use a different Worklight Project, without Dojo toolkit, for Windows Phone 8 apps.
[2013-11-12 22:14:28] Application 'KaiserTestApp' with environment 'windowsphone8' build finished.
There is a WP8 VM bug that might hurt ListItem and might explain your issue. To check if that you are falling into this just monkey patch the _ItemBase _setSelectedAttr method this way and see if that fixes your issue:
_setSelectedAttr: function(/*Boolean*/selected){
// summary:
// Makes this widget in the selected or unselected state.
// description:
// Subclass should override.
// tags:
// private
if(selected){
var p = this.getParent();
if(p && p.selectOne){
// deselect the currently selected item
var arr = array.filter(p.getChildren(), function(w){
return w.selected;
});
array.forEach(arr, function(c){
this._prevSel = c;
c.set("selected", false);
}, this);
}
}
this.selected = selected;
//this._set("selected", selected);
}
If that is fixing your issue let us know and we will see how to release an updated version of Dojo that workarounds that WP8 WM bug.