Windows Phone 8 fire a background task on call picked without accessing any call details - windows-phone-8

I am looking to develop an application where i just need to detect whenever a call is picked up.
I do not need any details related to call log and just need the event to be fired which will manipulate the sensors and do some functionality.
Is it possible to have that kind of access. Is it available out of the box and if not, is there a way that I can request for access from Microsoft?

WP apps don't have this kind of access/functionality.
Only possible way would be to use the Obscured Event (http://msdn.microsoft.com/library/windows/apps/microsoft.phone.controls.phoneapplicationframe.obscured%28v=vs.105%29.aspx) Which requires your app to be launched all the time you want to capture the activity.
The problem here is that Obscured event is also fired in the case of alarm or lockscreen.
I doubt Microsoft will grant you access to more functionality.

Related

Trigger BackgroundTask by calender events

Imagine a background task being registered to get triggered at a calender event (event from the build-in calender) from a Windows Phone 8.1 app. What are the possibilities for doing so?
As far as I prototyped it it is not possible to subscribe for the notifications. The only possibility I see is to copy all calender events at background task registration and let them sit in some owned cloud service that pushes raw notifications (raw notifications are very important) to my background task from WNS which requires internet connection which again is impractical. Moreover the service is required to be placed in lock screen. There are so many problems with synchronizing the calendar events if you think about it too.
The solution I would like to implement however should not require internet connection. How can I simplify it?
For more information on background tasks please visit https://blogs.msdn.microsoft.com/wsdevsol/2013/11/08/background-tasks-myths-and-realities/

Launch application automatically from a push notification on Windows Phone 8

I would like to launch an application using parameters provided from a push notification on Windows Phone 8.
The behaviour I wish to achieve is that as soon as the user receives the notification, the application will be launched with the parameters provided in the notification. I.e. seamlessly present the notification in a more user friendly way.
As far as I understood there are three push notification mechanisms. Toasts, Tiles and Raw.
None of them seems to be able to handle the wanted behaviour.
Toast: The message is shown even if the application hasn't been started. It does not start the application unless clicked on but seems to be closest to the target.
Tile: Message is shown if the application has been pinned. But they may be difficult to notice unless the tile is pinned fairly high on the start screen.
Raw: Works in more power states but requires the application to be running. This doesn't seem to be a match because I want the notification to be received when the application is not running. I couldn't find information about which application states where raw notifications are handled. I would prefer all.
Did I miss something in my research? If anyone has a hint of how to put an application in the foreground from a push notification (without user interaction) it would be greatly appreciated!
My first attempt was to trigger the application start using SMS but that seems to be a no go.
See my post Launch application automatically from an SMS on Windows Phone 8
You can not automatically launch an application on Windows Phone (and neither can you on iOS or Android). What you can do is provide a URI with the Push notification so the user is taken to a page with the needed information
you can not put an application in the foreground from background without user interaction.

ActionScript 3.0: Wait for response from Flash Player Settings window

I recently received some code from another developer and there's one piece I would like to rework. It's a flash app that works with mic and webcam. When it is started you are prompted to press a button - after that the usual flash player settings windows appears asking you to allow access to mic and cam. The application needs to wait for user's response on this question. It was achieved in the code I received in a rather awkward fashion. Application progressed on mouse movement event, which would not be registered since the flash player settings popup block the area. Once it out of the way - any mouse move would make application to go on. I need to rework with in some better way, because this piece of code is also used in AIR application that doesn't ask for allowance and, therefore, if you click the opening button you would need to move your mouse in order to get things running. I believe there must be some decent way to notify the app that settings popup is gone. Could anyone advice on this?
The correct way to do this in Flash Player is to listen for StatusEvent.STATUS event which is dispatched after the user either allows or denies you access to their mic. See the documentation for Microphone.getMicrophone().
In AIR, however, you don't have to ask for user's permission to access their mic and camera, so this event is not dispatched when your application gets access to the input device. In that case, you can check through Capabilities.playerType property if your code is running in AIR and then proceed with doing what you would have done in response to receiving permission to access user's input devices.

Suppress Reminder in Windows Phone and instead Simulate Navigation from within code

In Windows Phone, the reminder is usually used for scheduled notifications. The reminder when popped up, requires user to click the reminder pop up in order to navigate to specific page and do certain action.
Can we simulate or suppress this reminder programatically when occured and instead perform the action it was supposed to execute when actually clicked. This would be of great use to user.
Any help, suggestions or ideas on the same?.
Thanks In Advance.
It isn't possible. A Windows Phone application has very limited interaction with the system when it isn't running in the foreground.
If you're trying to bypass the reminder to display something (for instance, a page of your application) without user interaction, then you have no way of doing that.
If it's just about updating some data or calling a webservice without displaying anything, you should use a background agent instead of a reminder.
Windows Phone was built around the idea of letting the user in control at all time. That's why there is no way of forcing the user to navigate to a page of your application if it wasn't running in first place.

How to detect calls while app is in the background?

So I understand that a foreground app can detect phone calls by registering for the obscured event, but while my app is running in the background, playing sound, sending notifications, etc, it does not hit the same event.
Is there a specific way to handle phone calls in this circumstance? The obscured event is the only one that I can find for detecting phone calls, but it won't work in this instance.
Unfortunately, with the current API there isn't...
In fact, I'd say that the obscured event can't even be considered a reliable way to detect an incoming phone call: you can use it right now for that purpose, but tomorrow Microsoft can just go ahead and add new stuff that will raise that very same event!