Windows 7.1 SDK - Timing a call - windows-phone-7

I currently have a "dumbphone", but I'm trying to make an app that'll time and store the call duration of incoming calls for windows 7.1 ("7.5") phones, for the user scheduling purposes.
However, after extensive searching and googling, with topics like this one:
Windows Phone 7 - How to calculate call duration or termination
it seems that the Windows 7/7.1 SDK does not allow access to recognizing when a call is coming in. I've read about obscure and unobscure, but that this wouldn't be a good idea since it would start the timer anytime the UI hides the program, not just calls.
I've thought that maybe I could just pull the call duration or the start/end time from the call history, but windows 7 SDK doesn't support that either it seems.
So I decided to seek help. Is there a way to make this work? Is there some clever way to recognize when a call is incoming and stopped? Or some clever way to pull call times/durations? Or maybe a way to detect when the user presses that "accept incoming call" button? Or maybe a way to single out when a call is obscuring the UI?
Any help would be greatly appreciated. Thank you

Due to security reasons your application does not have any kind of accsess to call history ect. So you are in a sendbox and you don't know nothing about phone calls.

From the Windows Phone SDK, there is no way to achieve this!
The only thing I can think of is that when a call comes, the current app gets notified that is now Obscured because a new screen is now on top of it (the caller ID screen), and will get notified when it gets back to focus.
But the truth is that this happens even if a SMS message notification pops on the screen and the user taps to read it, or some app gets a notification pushed...

Related

Windows phone notification that stays till user checks

I am new to windows phone app dev. I want to know if there is any way to have a notification alive till the user checks it. I found that "toast notification" expires in 10 seconds irrespective of user checks it or not. And there is no way of finding out if a tile notification arrived or not. Is there any workaround? I want to have notifications that are similar to Android notifications which stay till user checks them.
Persistent on-screen notifications on Windows Phone are not possible, by intentional design. It's interesting to see how many users on Android disliked persistent notifications when applications started to interrupt and then disrupt the current foreground application experience.
The design philosophy is that they distract from the user experience and could be easily abused by applications.
The general Microsoft recommendation for the platform would be to use a combination of a notification, Live Tile (reference), and in application UI update.
In Android 4.3, the behavior was changed to highlight applications that were constantly running (interesting reference)
You can use "MessageBox.Show(String)".
Refer below for:
MSDN Doc
Example 1
Example 2

Starting my app when USB device connected

I need to starting my app when our USB device connected.
My first attempt at this is a background application that pays attention to when USB devices are plugged in. When it notices our device connected, it calls ShellExecute( ) and starts our application.
This works nicely except in Windows 8. Supposing we're on the "Start" screen in Windows 8. In that situation, the application starts in the background and the start screen remains in front.
I think this is a "focus" problem since what I'm actually hoping to do is "steal focus" from the Start screen.
http://blogs.msdn.com/b/oldnewthing/archive/2009/02/20/9435239.aspx
Since my background application doesn't have focus (the Start screen has focus; besides, my application doesn't have a UI), it can't give focus away to my foreground application.
Let me say that in general, I hate focus stealing. Starting the app the user wants to use is a great help to our users.
How can I fix this problem? Maybe the answer is to programmatically ask the start screen to start my app but I don't see a way to do that:
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/9ed23f32-0708-48a8-9ff7-5fce6dbe123f/windows-8-start-screen-api
Maybe I'm approaching this in the wrong way. Suggestions?
You're going about this the wrong way. Although you can write a program to constantly monitor the USB ports to detect when something is connected, there's no need. The OS is already doing that anyway.
Register an Autoplay handler for your device type and class. This is distinct from the old AutoRun feature, which would automatically execute programs found on an inserted file system.
You can begin with an overview of the feature from the November 2001 issue of MSDN Magazine.
Your handler will be a COM DLL. You can register the DLL as a handler, and register the handler with events you want to handle. You can either perform everything in the DLL, or you can put the bulk of the functionality in your application and just use the DLL as a proxy between the OS and your program.

Strange behavior in user idle detection in Adobe Air on Mac

I've got an Adobe AIR application written in pure AS3 that has some functionality that happens when the user is idle and then returns to the normal state when the user returns. I'm detecting this activity with the following code:
NativeApplication.nativeApplication.idleThreshold = 180;
NativeApplication.nativeApplication.addEventListener(Event.USER_IDLE, onUserIdle);
NativeApplication.nativeApplication.addEventListener(Event.USER_PRESENT, onUserPresent);
The onUserIdle method is called after 3 minutes as it should be, but then the onUserPresent event is fired almost immediately afterwards. I'm talking milliseconds later. This happens without any user input whatsoever. The bizarre thing is that this does not occur on Windows - only on OSX. And it happens on all flavors of OSX going back to 10.6.3.
Adobe's documentation is incredibly vague on how those events are determined, so I'm not sure if there is something I can do at the system level to fix the problem. Does anyone have any experience with this issue, and if not, any other suggestions on how I can detect user idleness even when the app does not have focus?
Just to preempt the suggestion, I cannot use mouse/keyboard listeners to simulate the same behavior because they do not work if the application loses focus, whereas the NativeApplication events still fire. I've also used NativeProcess to get the output of ioreg to get the hardware idle time as reported by the system, but it does not appear to be affected by the mouse.
I really appreciate any assistance.
Edit: I just discovered that this does not occur when the application is run in an Administrator account on OSX. It only happens in a User account, which only serves to confuse me more.
I figured out what the issue is. When the USER_IDLE event is fired in a user account, we did several things - one of which was forcibly kill the Dock in order to make sure it was hidden from the screen. For whatever reason, this resets the internally available idleThreshold count. This was not only happening in AIR - it was also happening when monitored through Terminal and it appears there is absolutely nothing that can be done to stop it. The solution was to stop killing the dock. Everything magically worked after that.

Force a call in WP7

I wonder if it was possible to force a call without using the messagebox confirmation (in debug mode for example...)?
I use currently PhoneCallTask ​​to make a call.
(My application should never go on the market place)
Thank you for your answers,
There is no other way to make a call then using PhoneCallTask(), even if your app is not going on the marketplace.
The current Windows Phone SDK only provides the PhoneCallTask to make calls, and this class shows the confirmation message box, so the answer is no...

is it possible to make an alarm or countdown timer app?

I'm a complete noob when it comes to WP7. From what I know of it, in WP7 you wouldn't be able to make an alarm clock app. As in, start app, set alarm for an hour from now, close app, app launches and rings alarm after an hour is up.
Is this not possible in WP7? Or is there some way of doing it that I'm not aware of? I have seen a workaround for a stopwatch using tombstoning, but that doesn't seem like it would work here.
With Windows Phone 7 [for 3rd party developers] it's not possible to write an application that runs in the background on the phone. (This was a deliberate decision with regards to maintaining performance and battery life - not a limitation of the OS which is fully multi-tasking.)
If you really want the user to be notified of something at a specific time, regardless of whether your application is running you'll need to have this monitored from a process on an external server and then send a [toast] notification to the user at the appropriate time.
Learn more about push notifications at http://msdn.microsoft.com/en-us/library/ff402537(VS.92).aspx

Resources