I'm developing a Voip application.
When I press the lock button(app goes to sleep), and the server sends a request I present a local notification.
The local notification is presented as it should and The button slider text says "slide to answer". If I slide here, the app gets open.
However, if now I press again the lock button, and then unlock, the notification is still presented and the slider text has changed to "slide to unlock".
Now, when I slide to unlock, it's as if I pressed the "close" button on a regular notification bar, meaning the app won't open.
My question is why on the second time the local notification is still presented ? and if so, is there a way to track the unlock button event or the unlock slider so I can tell the server that I don't want to answer the call ?
Thanks
The notification is only a dialog (i.e., the user can interact with it directly) for a short time - until the device is locked again, either by using the button or automatically after a time-out of about 15 seconds.
After that, it turns into a notification. The user cannot interact with it directly, apart from reading the message.
Sorry, but it doesn't get any better unfortunately.
Related
Need to have an event to be fired every time a page on my app is visible again (got focus).
Example: My app opens a browser, or people opens another app.
I need an event when browser or other app is closed and my app page becomes VISIBLE (on top) again.
OnAppearing() does not works in this case.
Is there a way to fire this event ?
Regards
I am making an Apple TV game and am programming the settings screens. The problem I am running into is that the Nimbus gamepad is sending multiple button pressed messages when I press the button just once. I would really appreciate it if someone could tell me if there is a way to make the controller send only one button tapped message when the button is tapped just once. I mean I would like it is there was a way to have only one message generated after I press a button and release the button. Thanks very much.
Looking at the GameController docs:
https://developer.apple.com/documentation/gamecontroller/gccontrollerbuttoninput?changes=_2
Are you using pressedChangedHandler or valueChangedHandler? IIRC, the Nimbus has pressure-sensitive buttons so you should expect to receive continuously changing values when the button is pressed or released. pressedChangedHandler should only be called when isPressed is toggled.
I need to show the exit confirm dialog when user pressing the Home button. If yes, need to exit the application.
Is it possible to show when pressing the Home button?
This would probably cause your app to be rejected
From the Apple HIG:
Always Be Prepared to Stop
iOS apps stop when people press the Home button to open a different app or use a device feature, such as the phone. In particular, people don’t tap an app close button or select Quit from a menu. To provide a good stopping experience, an iOS app should:
Save user data as soon as possible and as often as reasonable because an exit or terminate notification can arrive at any time.
Save the current state when stopping, at the finest level of detail possible so that people don’t lose their context when they start the app again. For example, if your app displays scrolling data, save the current scroll position. To learn more about efficient ways to preserve and restore your app’s state, see “State Preservation and Restoration”.
I'm not sure you can stop the app from terminating or going into the background. You can tell it is about to go background through the app delegate applicationWilResignActive or be terminated by applicationWillTerminate.
I know this has been asked before. However...
While until recently I thought that the only possible and accepted Alert is the text with 2 buttons I found some apps which have a different local alert.
So I assume there is an accepted way to customize the lokal Alert. Is this correct or have these apps just "slipped" into the store somehow - as I know this happened before with feature and then the app disappeared from the store suddenly.
I could not find anything about it.
Many thanks
As of iOS 5:
When a UILocalNotification is delivered while the device is locked, it appears on the lockscreen with a swipe slider to open the app.
If the notification is delivered while the device is in use, it can appear either as a banner across the top of the screen, or as an alert with two buttons.
One button is always a cancel button.
The other button opens the application. You can change the text of this button by setting the alertAction property.
You can disable this action button on the alert by setting hasAction = NO on the notification).
There are no other available ways a notification alert can arrive, unless of course the device is jailbroken. In that case, many things are possible.
Before iOS 5, only popup alert notifications were supported.
Due to the nature of iOS, it is technically not possible to deliver a notification in any other way, or customise the alert, as the notification delivery is handled by the system and the app has no access to the system UI, and so cannot display any messages by itself. And even if you did somehow manage that, Apple wouldn't allow it.
Read the UILocalNotification docs here: http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Reference/UILocalNotification_Class/Reference/Reference.html for more detailed information.
I want to simulate a lightweight iPhone "widget" by having a specific notification in the notifications center that opens the app and performs a quick action (i.e. "Add new task").
The problem is that when I get new notifications (push or local notifications), the widget task is pushed down, and the most recent notification becomes the first one.
I tried solving this by adding a repeat interval for the "widget" notification, but the problem is that it duplicates this notification, and since I'm in the background I can't cancel the previous ones.
Any ideas?