In Windows Phone 8.1 the default ActiovationPolicy changed from Replace to Resume.
I have a Windows Phone 8.1 Silverlight app and I want to use ActivationPolicy="Replace". Changing ActivationPolicy="Resume" to ActivationPolicy="Replace" does not work, the app still resumes.
I remember one video from build claiming that this should work, but is this really possible? If so, what is the way to make the app replace instead of resume?
Windows Phone 8.1 Silverlight apps always resume (http://social.msdn.microsoft.com/Forums/wpapps/en-US/caf0d79a-c55e-4046-afc1-86260c005205/activationpolicyreplace-not-working-in-windows-phone-81?forum=wpdevelop)
Related
I am trying to find a way to distinguish if my app is running as UWP app on a phone or if it Both WinPhone 8.1 and UWP app on a phone have a Device.OS of TargetPlatform.Windows. Thus I cannot find a way to determine if it is a UWP app or Windows Phone 8.1 app running in a phone. Any suggestions? My sample code is below.
if ( Device.OS == TargetPlatform.Windows)
{
this.grdButtons.ColumnSpacing = 0;
}
If you are still looking for an answer.
Below: https://learn.microsoft.com/de-de/xamarin/xamarin-forms/platform/device
The using-directive Xamarin.Forms offers a function to get the runtime-platform. You can compare it to Android, WinRT, WinPhone, macOS, iOS, UWP. For example:
if (Device.RuntimePlatform.Equals(Device.UWP))
{
}
Furthermore you can also compare the device's idiom, to identify if your application is running on Phone, Tablet, ...
I have existing windows phone silverlight app that works fine on windows phone 8.0 and 8.1. However on windows 10, my app terminates during suspend event.
It took me a while to understand that problem in that my app takes too much time on main thread during suspending and system terminate it as stop responding.
Using winrt api the solution can be accomplished by this code:
var defferal = SuspendingEventArgs.getDeferral();
await someSavingMethod();
defferal.Complete();
However I simple don't have access for that api, as my app uses only windows phone api (for running on windows phone 8.0)
Is this possible to somehow call this winrt api in my code or maybe fix suspending termination with other way on windows phone 10?
Not possible, you have to use what the 8.0 API offers to accomplish your goal.
I am developing an Universal app capable of running on both Windows Phone and Windows. But initially I want it to be available to phones only because I have not made the Windows part of it. So how can I limit the target devices of this Universal app without creating a new app and without removing the Windows Code from it. I want it to be available to phones only for deployment. Can anybody give a solution?
Windows and Windows Phone apps are submitted separately to the Store. The process for submitting Windows apps is outlined here and for Phone here. So you can simply submit one without the other.
You can also stop building the Windows portion of the app using the Configuration Manager if you want to (to save time or avoid compilation errors you don't want to fix yet).
Reminders in my app, Muslim Prayers works great on Windows Phone 8 and whenever a user taps on any reminder, it simply launches the app.
I have updated my phone to Windows Phone 8.1 and the same app works fine.
However, after re-targeting my app to Windows Phone Silverlight 8.1; the reminders do not launch an app upon tapping on it.
I want to know is this a known bug or am I missing something?
Thanks
I'm writing a Universal App for Windows 8.1 / Windows Phone 8.1 that at some point displays a list of phone numbers. What I would like to do is allow the user to press one of these numbers and have the device call (or ask permission to call) that number if running on Windows Phone 8.1. I know this was previously possible in Windows Phone 8 by doing the following:
using Microsoft.Phone.Tasks;
PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "2065550123";
phoneCallTask.DisplayName = "Gage";
phoneCallTask.Show();
NOTE: This code is wrapped in #if WINDOWS_PHONE_APP
However, when trying to import Microsoft.Phone.Tasks, Visual Studio is unable to find the reference. I know that "ID_CAP_PHONEDIALER" had to be enabled in WMAppManifest.xml in Windows Phone 8, but this doesn't seem to be possible with the universal app model. I've been searching around for a solution but can't find a recent one that includes Windows Phone 8.1 (not Silverlight).
Is there any way to make a phone call from within a universal app? Or is it simply not possible at the moment?
In Windows Phone 8.1, We can make phone call by "Windows.ApplicationModel.Calls.PhoneCallManager", just like this:
Windows.ApplicationModel
.Calls.PhoneCallManager
.ShowPhoneCallUI("phone number", "display name");