track application stack change event wp8.1 - windows-phone-8

I am new to WP8 development, I need to know is there a way to trace the application stack change (check if application comes from deactive (dormant) to active (tombstoned) state) event in wp8.1 same as android gives us. If it is how we can trace that particular event and before opening the app change stack with my own app. Actually I am planing to create an applock application same as android have.
Thanks and Regards
Inderjeet Singh

It is possible to 'track' the state of your app - not the application stack. However it also depends on the platform you are targeting:
for WP8.0 and WP8.1 Silverlight - you have Activated and Deactivated events. For more help - read App activation and deactivation for Windows Phone 8 - there are more cases to be considered.
for WP8.1 WinRT - you have Suspending and Resuming events - for more help read Application lifecycle (Windows Runtime apps) - there are also more cases to be considered here.
I doubt you will be able to exchange the opened app.

Related

windows phone 8.1 music library get current media queue

How to get current media queue in windows phone 8.1 (runtime) as in windows phone 8 MediaPlayer.Queue
Is it available or we have to implement?
Similarly IsShuffled functionality is there ?
The MediaPlayer API belongs to the Microsoft.Xna.Framework.Media namespace which is no longer available for WinRT components. So you can't use it but you can implement your own logic for it using the MediaElement API which has sufficient properties for a media player except for the logic of queuing etc.
The explanation here and the msdn-code-sample would surely help you out.
For background music player you should use the SystemMediaTransportControls API and attach the events that occur when your app is running in background.
This link has a background audio explanation. Seems helpful.

Should I target WP8 users while developing new app?

We are planing to develop new app .It has VoIP feature and app is similar to whatsapp.
Since the app has Voip feature we have to go with WP8 silver light. Winrt for WP is not supporting VOIP api.
Can we guess almost all the WP8 devices are upgraded to WP8.1 ? If there are large user base still remains in WP8 we will develop the app using WP8 api's (Using VS2012). Otherwise we will go with WP8.1 api's (using VS2013).I heard there are few performance improvements and controls are available in WP8.1
Any suggestions on this ?
Thanks in advance
All Lumia phones can be updated to WP8.1 and a huge part of users so did.
Just an article for reference: http://www.engadget.com/2014/04/02/nokia-lumia-windows-phone-8-1-update/
On my apps I use analytics to track users and I hardly see few users stuck with WP8.
Update - market share
http://www.gsmarena.com/adduplex_wp81_market_share_surpasses_wp80-news-10062.php
This article is from last October, WP8.1 has been out for about 5 months and it had already surpassed WP8. I let you think the actual quota...
Should you go with WinRT? It depends on your needs. Of course you should use at least WP8.1 Silveright (not WP8). But if your application does not require specific functions only available in WinRT, you might go with WP8.1 Silverlight, since WinRT has still many little performance issues.
There are a lot of new available APIs and features either for WP 8.1 Silverlight or WinRT. I would definitely target 8.1. Users still using WP 8.0 probably don't care that much about apps anyway.

How to turn on /off the capabilities through a Windows 8.1 RT app

I am trying to develop an application which will deal with the following hardware and perform the stuff mentioned. I want to know that would it be feasible .
1)
Wi-FI
Scan for wi-fi , provide option to turn it off and on or reboot it .
2)
Bluetooth
Turn it off /on , make it discoverable if its not discoverable.
Apps
Get list of all apps that are installed and provide an option to kill them if they are running or uninstall them. The provision should also list the user the apps which he has sideloaded(need to know which all are the sideloaded apps).
Internet Connectivity
If internet is connected , check whether data is flowing or not.
Battery Status
Find all those apps which are consuming too much battery.Provide the option to uninstall them and lower the screen brightness and decrease the screen lock time
All these have to be implemented in an application that I want to develop.
I would be needing links for answers so that I can provide it in my feasibility report.
thanks
You will need to write a desktop app for this. Most of what you're looking for is completely out for a Windows 8.1 Runtime app. Windows 10 adds functionality for several of the bullet points, but in both versions you'll need a desktop app to manipulate other applications.
Universal Windows apps (aka Windows Runtime apps) run isolated and cannot generally affect the system or other apps. They can make changes only within their own context.
1 and 2: Windows 10 adds the Windows.Devices.Radios.Radio class to address your radio bullets, but this functionality is not available in Windows 8.1 Runtime apps.
3: This cannot be done from a runtime app. A desktop app can enumerate a user's apps with the Windows.Management.Deployment.PackageManager class.
4: You can query connectivity with Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile
5: This is not available in a Windows 8.1 Runtime app. In Windows 10 see Windows.Devices.Power.Battery

PJSIP not running in Windows Phone 8 background process

I've studied the Windows ChatterBox sample app for Windows Phone 8 and I was able to write a small app to try out PJSIP. However I've run into a problem with the CallInProgressAgent. When creating an outgoing call, I create a VoipPhoneCall object by calling the RequestOutgoingCall method on the VoipCallCoordinator class, thereafter I create the pjsip call by using the pjsua api. It seems pjsip looses all rtp connectivity as soon as I call the RequestOutgoingCall method. My guess is that pjsip is unable to run in a background process initiated by calling the RequestOutgoingCall method. Can anybody shed more light on this situation?
I found this on the pjsip website:
Windows Phone 8 (WP8) support is being added and is still under development on projects/winphone branch. Specific considerations for this platform are:
WP8 governs specific interaction with WP8 GUI and framework that needs to be followed by application in order to make VoIP call work seamlessly on the device. Some lightweight process will be created by WP8 framework in order for background call to work and PJSIP needs to put its background processing in this process’ context. Currently this feature is under development.
The moral of this story is that we cannot use PJSIP in an application until the above background process development is complete.

Starting with audio in Windows Phone 8

I recently started doing some development in the Windows Phone 8 OS I'm pretty new on this. I was doing some searching about the fact to create an app who play any audio for some specific events/actions.
I was reading the Windows Phone API reference from Windows Phone Dev Center http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff626516%28v=vs.105%29.aspx#BKMK_Win32andCOMAPIforWindowsPhone
But it seems a little confusing to me at first glance and I have the doubt of which one of the following should I use to accomplish my task.
The .Net API for Windows Phone
Win 32 and COM API
... or the Windows Phone Runtime API
Any help would be very appreciate
It really depends what you're trying to do. If you're writing a native application or are interested in cross-compatability with Windows 8 then XAudio2 or the WinRT APIs are definitely the way to go. If you just want to play some infrequent sounds (say, when you pop up a warning dialog) from within a XAML app then I have seen a number of approaches, teh easiest of which is probably just having a MediaElement in your XAML that you use to play the audio.