Access deep link information from Reminders API? - cocoa-touch

iOS 9 introduces a new reminders feature which allows you to deep link back to any app (including 3rd party apps which implement the NSUserActivity API).
For example, if you launch Messages, tap a conversation, hold the home button, and say, "Remind me about this in 5 minutes," you will get a reminder with a Messages icon. Tapping on the Messages icon from within Reminders later on will take you directly to that conversation.
If I use the EKReminder API, I can get this reminder, but can I get any of this other information?
In other words, is there any way to:
Know that this reminder has special metadata associated with it?
Get the deep link associated with it?
Get the icon of the app that will handle the deep link (just like the Reminders app does)?
From Apple's iOS 9 page:
"Remind me about this when I get in the car."
Siri can remind you about things you’re looking at in your apps — like Safari, Mail, and Notes — and want to follow up on later. If you’re halfway through an email, you can say “Remind me about this tonight.” Or if you’re looking at a place in Maps you want to stop at later, you can ask for a reminder when you get to your car.

Related

How do I notify users of new content available in tvOS apps from the home screen?

Push notifications have been left out of tvOS (understandably so) but the docs seem to contradict themselves in alerting users to the fact that there is something new available in your tvOS app.
Here it seems to say that you can add an app badge: https://developer.apple.com/library/prerelease/tvos/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/WhatAreRemoteNotif.html
Here it says they've been removed from UIKit: https://developer.apple.com/library/prerelease/tvos/releasenotes/General/tvOS90APIDiffs/Objective-C/UIKit.html
Removed UIApplication.applicationIconBadgeNumber
Assuming the badge approach is not supported in this release, does anyone know the best practice for alerting a user that there is new content in your app without the user taking an explicit action? ie focusing on the app and showing them something in TopShelf?
I encountered the same problem and dived into this. Probably your best way is to update the topshelf with latest items, which is my way to solve this for now. You can use network calls to update the topshelf with content from your backend.
This depends on the type of application. E.g. showing the latest top movies for a movies app.
You can trigger an update of the topshelf after your network call completed using the following code:
NSNotificationCenter.defaultCenter().postNotificationName(TVTopShelfItemsDidChangeNotification, object: nil)
Make sure to implement the TVTopShelfProvider which should be clear using the following documentation:
This protocol is adopted by the principal class of an app’s TV Services extension. Apps that implement this extension can provide dynamic content to the Top Shelf element rather than having the system use the static image submitted with the app. The topShelfStyle property specifies the interface style you want, and the topShelfItems property specifies the content items to display. Whenever you change the content provided by the extension, post a TVTopShelfItemsDidChangeNotification notification to prompt the system to reload your content.
Icon badges are removed for app icons, push notifications as well (except for silent push notifications).

How do I send notifications on an AndroidTV?

I have been reading the documentation pages for Notifications for Android devices but I want to build and display notifications on an Android-TV. I have used several apps in the AndroidTV and none of them shows notifications, instead sometimes they appear in the recommendations bar,which leads me to believe that it may not be possible to display notifications on this family of devices.
My end goal is to dispatch a Heads-up notification (priority flag set to MAX) so it can be shown regardless of what the user is doing.
Can someone help me to achieve this, maybe pointing me to some more specific docs?
UPDATE I have found this application that displays notifications, but I cannot understand how it works. Is it possible that it is mimicking notifications without working with Android's API?
I also think notification will appear as "recommendation" and not appear as "notification".
For the Notifications for Android TV app, I guess it is using custom designed Toast instead of Notification.

Opening the Camera App in Windows Phone (7 or 8)

Is there a way to launch the camera app programmatically, from my own app? I know that you can use one of the tasks to launch it, allowing the user to take a single photo, but I want the user to be able to take multiple photos. The user could then just hit the back button to go back into the app. I could then track which ones were new by the date/time they were taken.
Jeffrey, you can use CameraCaptureTask class to launch the camera application. More info here
With this class you can take advantage of the camera, to take multiple pictures or something else. You need to manipulate the Completed event.
Hope it helps :)
There is great article here that guides you to the entire process of adding a camera to your app. It even allows you to take multiple images, rename them and saves them to the Camera Roll of your phone.
You could then use the DateTime class to add the date and time of the photo to the photo name (along with the name of your app), thus allowing you to better track the images taken.

Disable iphone home button in app, is it possible?

I want to develop a screensaver-like app where the only way of getting back to the springboard is entering a code. Therefore I would need the Home Button action to be ignored, that is that when the user presses the button nothing happens..or something custom...instead of going back to the springboard and terminating the app.
Is this possible? does anybody know if apple will approve/reject this kind of app?
The answer to your question is, yes.
The answer to the question you meant to ask--can I ship an app through the iPhone store that has the home button disabled--is no.
If you are only publishing your app to jailbroken phones you can do it, but it will piss everyone off.
Edit 7 years later:
This is actually extremely possible now--there is a standard feature in the iPhone called "Guided Access". It's hidden under that "Accessibility" Link (With some other fairly cool stuff like flashing the LED whenever you get a call and allowing a Bluetooth keyboard to tab between controls)
It's called "Guided Access". You set a passcode, launch the app then triple-click the home button to start guided access.
It disables exit and allows you to designate regions of the screen you can't touch. You can also set a time limit (For kids playing which seems to be the reason a lot of people look up this question).
Tempted to edit the "Accepted answer" and throw this info in there, but that seems rude so I'll just hope people find this answer.
Annoyingly you also seem to be unable to shut off the phone--I suppose this is perfect for people who want their kids to play a game, but might not hit the original asker's problem of restricting access to a single app (I mean it WILL do that but it'll also prevent it from doing ANYTHING else).
Not with public APIS (and hopefully, not with private ones). Even if you manage it somehow, Apple will reject it for breaking UI guidelines. Moreover, even if they didn't, people could always use the iPhone's "Force Quit" equivalent to hard terminate your app.
Apple is not going to approve this type of app, they state pretty explicitly that you're app needs to respond appropriately to springboard telling the app to terminate both when things like phone calls come in and when memory warnings come in.
This is not possible with the current SDK, nor do I suspect it will ever be.
You might be able to get this behaviour via jailbreaking, but you won't be able to sell your app through iTunes, nor will Apple ever approve such an application.
You can do it like this
Install the following mobileconfig file
This will disable the home button once you launch the app
Download
Found the link Here
Apple won't allow it.
What if something emergency happens and you wan to dial an emergency phone number. You are putting the user at risk. The trade-off isn't worth it.

Display an alert over the lock screen?

On the iPhone, when your phone is locked and screen off, if a SMS message comes in, the screen turns on and an alert shows up.
Currently I am using UIAlertView to create the alert dialog (with 2 buttons).
If the phone is off/locked, nothing shows up until I turn it back on and unlock it.
Is there any way to simulate the 'SMS preview' behavior, possibly with another class, and hopefully still allow the user to interact with the buttons there?
CFUserNotificationCreate is your friend.
Not in the official iPhone SDK? Too bad, I remember that a year ago on the big presentation of the yet-to-come SDK, an Apple evangelist/chief saying that the SDK would include exactly the same API as used internally by Apple... Pfff...
/John
What you want to do is not currently supported by the SDK. You should file a request with Apple.