I am new to Windows Phone 8 application development and I am creating an application for setting alarm. I have created it and scheduled some alarms . It shows default alarm window with "Dismiss" and "Snooze" buttons. Can I have the provision to override the dismiss and snooze button events from my application. Or can I start my application which set the alarm when the alarm fires? Is anybody knows the answer please help me.
I guess there is no such way to override these buttons for an alarm. But if you are going to use a reminder then you will be able specify a relative navigation URI, and when an user taps on the reminder pop up you could redirect the user to your app.
For more refer here
http://www.geekchamp.com/articles/getting-started-with-windows-phone-alarms
Hope it helps!
You can not Override that butttons but you can have events that are fired when alarm popup opens or dismissed.
Inside your App.Xaml.cs, you can subscribe to the Obscured and Unobscured events of your RootFrame.
RootFrame.Obscured += new EventHandler<ObscuredEventArgs>(RootFrame_Obscured);
RootFrame.Unobscured += new EventHandler(RootFrame_Unobscured);
When the alarm pops up, RootFrame_Unobscured will be fired; after you dismiss it, RootFrame_Obscured will be fired.
Related
There is a button in the middle of an app. After you touch the screen and click on it, you receive a click event on the button. What happened in the middle?
I used to face a bug, use the UIWebView, one input element in an HTML can't response the click event, but the WkWebview can.
Now I want to confirm the question below:
What happened from you touch the screen till iOS app receive the click event?
After I had viewed the Woodstock's answer. I edit this question.
Don't consider the hardware, just think the iOS system.
There are multiple events triggered, for example:
Finger down, Finger moved, Finger Up.
Additionally there are events for where that occurred, e.g. inside or outside a control.
If you are asking what's happening in the quantum between contact with the capacitive display and the processing of the event by iOS this is not well defined.
Suffice to say, clock cycles and processing :)
What event should I be looking for in order to detect when a user interrupts my app by streaming other airplay content to their apple TV.
The more important of these two from my perspective is to detect when the user exits airplay and my app regains 'focus' - but both enter and exit would be useful.
just tested and yes, the onResume and onSuspend callback function is called according to the apple docs:
https://developer.apple.com/documentation/tvmljs/app
I don't think you can tell if it was suspended from Airplay or Siri tho. I would imagine you can add gesture recognizers to see what button is pressed and tell if it was from any of the button clicks.
I am developing a VOIP app based on the VoipChatterbox sample app project and I need to manipulate the headset button click.
I see that, during an active call, when I press the button on the earphone, I get a CallEndRequested event and I need to call NotifyCallEnded within 5 seconds.
But I need a different behavior for my app. I need to simply turn the microphone off / on (toggle behavior) when the user presses the headset button. (This requirement might seem odd, but that's what make sense in the context of my application). How can I achieve this behavior?
To summarize :
Is there any other event to understand that user has pressed the earphone button?
Is there a way to override the behavior that NotifyCallEnded should be called in five seconds when CallEndRequested event is fired?
In my windows phone app, i have to delete some files when user navigates away from a page.
I have handled this on OnBackKeyPress event. This works perfectly fine.
The issue is newer updates of windows phone 8 and windows phone 8.1 also have close button on the top right corner. I have not found a way to handle this event.
Could anyone please let me know how can i handle this event and delete the files.
Rather than using OnBackKeyPress, you should use OnNavigatedFrom. This event is triggered whenever the user leaves the page, no matter how.
If you need to handle only the specific case when the app is suspended/terminated, you can subscribe to the Deactivated and Closing events on the PhoneApplicationService.
PhoneApplicationService.Current.Deactivated += yourHandler;
Note that is the your event handler is a non-static method declared in your page, then you must make sure to unsubscribe the event when leaving the page, to avoid a memory leak. To know when to unsubscribe, you can stick to your OnBackKeyPress logic.
I would like to detect the user tap the home button the quit the app, and come back to the app . is stage.activate and stage.deactivate works?
stage.addEventListener(Event.ACTIVATE,volRestore);
stage.addEventListener(Event.DEACTIVATE,volFade);
Cheers
Bill
Yes, those are the correct Events to listen for - on mobile, the app wont actually exit, it will just 'freeze' when user 'closes' it.
Not sure if you need to attach to Stage though - "this" should suffice - assuming your code is in top level of app.