Recognize the duration time (start, stop) when user answers a incoming/outgoing call - windows-phone-8

Can i recognize the start time and end time of duration call when user answers incoming and outgoing call?

There are events you can track when your app is running and you get an incoming call or alarm or any other system related popup.
there is no exact way to say if it's a call, alarm or other system application hiding your app. The events are called Obscured and Unobscured:
msdn link obscured event: https://msdn.microsoft.com/library/windows/apps/microsoft.phone.controls.phoneapplicationframe.obscured(v=vs.105).aspx
Example on Nokia wiki on how to implement this:
http://developer.nokia.com/community/wiki/How_to_handle_phone_calls_and_other_interruptions_in_Windows_Phone

Related

Firebase event is not showing in Event tab

I have created a event on my Firebase dashboard
and can see it in Debug View
But I cannot see it in Events Tab, it's not there and I cannot mark it as a conversation event, as I need to set it.
Creating one from conversations tab does not specify app platform, which I need it to be for my iOS app.
How do I fix this issue?
There's an intended delay before the data shows up in the Events page. The initial data logged usually takes up to 24 hours to display and 3-4 hours delay for the succeeding data. DebugView on the other hand, shows you data (from events, event parameters, and user properties) as Analytics collects the data. This is used to help you set up data collection, troubleshoot issues as issues arise, and understand a user's behavior as the user explores your website or app. For additional information about the delay in Analytics reporting, you can refer to this blog post.

Apple Wallet Event Pass - Device registration

We created a wallet pass and sent the wallet pass invitation email to end-users. However, there was an issue with the back-end APIs which prevented the Apple pass from automatically calling the device registration API.
The question I have is, do we need to re-inform all user to reinstall the Pass, or will the Pass automatically try re-registering by calling the device API.
Thank you.
The way you have worded your question possibly describes an impossible situation. A valid pass will always attempt to register. You state that your API was the issue, but an issue with a web service implementation would not prevent devices attempting to call it.
If the pass.json contains a valid https webServiceURL an authenticationToken, it will call the device registration endpoint after it has been added to the user's wallet. If the device does not get a 201 or 200 response, it will continue to retry, progressively backing off from every few seconds, to every few days for a period of around 2 weeks.
Therefore, if your pass.json contained the correct information; assuming that the issue was with your device registration endpoint and assuming that you picked up and addressed the issue quickly, then you should see device registrations coming in without having to do anything.
If it took longer than a couple of weeks or if you want to accelerate the process, you could ask your users to toggle the Automatic Notifications setting on the back of the pass. This will force the device to attempt a re-registration.
If however, the pass does not contain a webServiceURL, or if the webServiceURL was incorrect, then the device will not call back, or will call the incorrect endpoint. In this case, the only option is to have your users reinstall the pass. In this case, it is not your API that is causing the problem, but your passes.

What would happen if # of events exceeds 500 on Firebase Analytics?

I have been using Firebase Analytics for my apps and I like it.
Currently I have 300 events set up on one of my apps.
I learned that the max number of events we can have is 500.
What would happen if # of events exceeds 500 on Firebase Analytics?
Would it just stop logging new event? (501st event)
Or is there any better way to avoid it?
I will appreciate your advice!
Extra events are dropped. A firebase_error event is logged with a firebase_error parameter which indicates the error code. See this documentation for more information.
There's no other way to avoid it, but to manage your event logging implementation properly. Note that event in Google Analytics for Firebase is equivalent to the user's interaction within your app.
I would not suggest to create or log an event with incremental index, prefix or suffix in the name. You may also want to use the event parameter.
For example, you have a login page (with authentication methods of using Facebook, Google or Username/Password) and you'd like to track what is the most commonly used by the users. With this, you could log a custom event with the name of "user_login" and a parameter or login_method. After this, add the parameter in the custom parameter reporting to see the counts.
Hope this helps :)
Just for clarification because this confused us and there is no clear documentation on this:
The 500 events limit is per user per day and not per project globally. So events are only dropped after a single user uses more than 500 unique events per day, everyone else will continue to log events.
So if you have more than 500 events thats fine, you dont need to replace them you just need to remove them from your current app from being logged and use new ones, then this user will never use the old events and it does not count towards his 500 event limit.

How to discard old toast notifications without closing push channel?

According to MSDN, MPNS will put the notification requests in queue for delivery, so there is always time delay for them to get to device. My problem is that, sometimes, for example when the device goes to Temp Disconnected mode, the time delay is so long that the toast notifications become outdated when they arrive. Is there a way to discard/ignore these old toast notifications without renew the current push channel? If not, is it all right for me to renew push channel every time I open app?
As far as I know, it's OK to renew the channel every time you open the app. If your app is not running and you don't have a background task getting these notifications, you will automatically be discarding them anyway. Also, if my memory serves me correctly, should you use the channel request with an object that has been previously used to receive stuff from the channel, you can get the same channel (I might be wrong here). In this case, if you get old messages, you probably have to handle the local discarding manually.

Determine when user leaves WinJS app

I'm building some very basic analytics for in-house WinJS apps. Take this to mean that a 3rd-party analytics solution would both overkill and/or unworkable and/or against the 3rd-party providers terms of use as they generally disallow capturing personally identifiable information about the user, and in this case that is a business requirement.
The thing I'm trying to do is determine how much time is spent in multiple apps, and in areas within certain areas of the app. For this I obviously need to know when they enter and leave.
All the documentation I've found says to use the WinJS.Application.oncheckpoint event or the Windows.UI.WebUI.WebUIApplication.onsuspending event, which really seem to be two access points into the same basic concept. The problem is this doesn't accurately reflect when the user leaves the app! Suspend seems to happen only after the user has switched to another app, plus about 10 seconds ...... if the system feels like it.
If the user simply hits the Windows key to go out to the Start Screen and just sits there, the app continues to run indefinitely (calls to setInterval are able to affect state) even though the app cannot be seen!
I understand this is a bit of an edge case, but is there any more reliable way to tell when the user can't see the app, for lack of a better definition?
Notes:
I did look at the Cordova 2.7 code for Windows 8 and they are using the checkpoint event to drive the Cordova pause event.
App Visibility section on Application lifecycle seem to address this. This means registering for `msvisibilitychange' event, to know when user moved away and moved back to your app.
default.js:
document.addEventListener('msvisibilitychange', function ()
{
console.log('visibility changed');
console.log(document.visibilityState); // 'hidden' or 'visible'
});
In addition, suspending, resuming and activated events also needs to be handled.
default.js:
Windows.UI.WebUI.WebUIApplication.onsuspending = function ()
{
console.log('suspending');
}
Windows.UI.WebUI.WebUIApplication.onresuming= function ()
{
console.log('resuming');
}
Needless to say, that nuance of ordering, and/or event being absent cases needs to be handled. For example - if the user moves away and comes back quickly, visibilitychange event will be received. whereas if user does not come back suspending event may come after some time. if the app is not terminated, it may be followed by resuming event. otherwise, activated event.
regards spending time on specific pages, page ready and unload method should work. unload() will not get called if the app is suspended or terminated.
https://developer.mozilla.org/en-US/docs/Web/Reference/Events/visibilitychange
Use the visibility change event to recognize when the user can no longer see the app.