VDARContext Class Reference
Inherits from | NSObject |
Declared in | VDARContext.h |
Overview
Object representing an AR Context.
This class provided properties in order to retrieve some information about the detected context. Furthermore it can inform the application the state at which the context is currently at (see contextState).
Tasks
-
name
The name of the context as entered in ARManager. Can be nil if no name is given.
property -
lastmodif
The last time at which this context was modified
property -
remoteID
If the context is remote, this property stores the remote ID of the context. This property is set to nil if the context is only local.
property -
contextDescription
The description of context
property -
notificationTitle
The notification title currently associated with this context. Note that it can change throughout app life. Nil if no title is set.
property -
notificationMessage
The notification message currently associated with this context. Note that it can change throughout app life. Nil if no message is set.
property -
imageThumbnailURL
The web URL to the thumbnail of this context image.
property -
imageHiResURL
The web URL to the full resolution image of this context.
property -
contextFiles
A list of NSString representing the different filenames of the files attached to this context.
property -
– downloadContextFile:progress:completion:
Asynchronously download (if needed) the context file identified by its filename.
-
– contextImageThumbnailAsynchronously:
Asynchronously return the context image thumbnail (if any).
-
– contextImageAsynchronously:
Asynchronously return the context image at size which can be used for a full screen preview.
-
– activate
Activate the context’s content to the user. This is typically done when a context post a notification and the user accept it, while the application is in foreground.
-
– ignore
Ignore the context’s notification and mark as if the content has been played.
-
– executeJSInContext:
Execute and evaluate the JS string in the Context AnnotationJS system.
Properties
contextDescription
The description of context
@property (nonatomic, readonly) NSString *contextDescription
Availability
Version 5.0
Discussion
The description of context
Declared In
VDARContext.h
contextFiles
A list of NSString representing the different filenames of the files attached to this context.
@property (nonatomic, readonly) NSArray *contextFiles
Availability
Version 5.0
Discussion
A list of NSString representing the different filenames of the files attached to this context.
The different files are specified in the Metadata section of PixLive Maker. The [VDARContext downloadContextFile:progress:completion:] method can be used to asynchronously retrieve one of this file by providing its filename.
Declared In
VDARContext.h
imageHiResURL
The web URL to the full resolution image of this context.
@property (nonatomic, readonly) NSURL *imageHiResURL
Availability
Version 5.1.7
Discussion
The web URL to the full resolution image of this context.
Declared In
VDARContext.h
imageThumbnailURL
The web URL to the thumbnail of this context image.
@property (nonatomic, readonly) NSURL *imageThumbnailURL
Availability
Version 5.1.7
Discussion
The web URL to the thumbnail of this context image.
Declared In
VDARContext.h
lastmodif
The last time at which this context was modified
@property (nonatomic, readonly) NSDate *lastmodif
Availability
Version 1.0beta r85
Discussion
The last time at which this context was modified
Declared In
VDARContext.h
name
The name of the context as entered in ARManager. Can be nil if no name is given.
@property (nonatomic, copy) NSString *name
Availability
Version 1.0beta r85
Discussion
The name of the context as entered in ARManager. Can be nil if no name is given.
Declared In
VDARContext.h
notificationMessage
The notification message currently associated with this context. Note that it can change throughout app life. Nil if no message is set.
@property (nonatomic, readonly) NSString *notificationMessage
Availability
Version 5.1
Discussion
The notification message currently associated with this context. Note that it can change throughout app life. Nil if no message is set.
Declared In
VDARContext.h
notificationTitle
The notification title currently associated with this context. Note that it can change throughout app life. Nil if no title is set.
@property (nonatomic, readonly) NSString *notificationTitle
Availability
Version 5.1
Discussion
The notification title currently associated with this context. Note that it can change throughout app life. Nil if no title is set.
Declared In
VDARContext.h
remoteID
If the context is remote, this property stores the remote ID of the context. This property is set to nil if the context is only local.
@property (nonatomic, readonly) NSString *remoteID
Availability
Version 1.0beta r85
Discussion
If the context is remote, this property stores the remote ID of the context. This property is set to nil if the context is only local.
Declared In
VDARContext.h
Instance Methods
activate
Activate the context’s content to the user. This is typically done when a context post a notification and the user accept it, while the application is in foreground.
- (void)activate
Availability
Version 5.1
Discussion
Activate the context’s content to the user. This is typically done when a context post a notification and the user accept it, while the application is in foreground.
Declared In
VDARContext.h
contextImageAsynchronously:
Asynchronously return the context image at size which can be used for a full screen preview.
- (BOOL)contextImageAsynchronously:(VDARContextImageCompletionHandler)completionBlock
Parameters
- completionBlock
The completion block to call when the image is available
Return Value
YES in case of success, NO if for some reason the thumbnail cannot be retrieved.
Availability
Version 5.0
Discussion
Asynchronously return the context image at size which can be used for a full screen preview.
The block is called on the main thread when the image is available.
Declared In
VDARContext.h
contextImageThumbnailAsynchronously:
Asynchronously return the context image thumbnail (if any).
- (BOOL)contextImageThumbnailAsynchronously:(VDARContextImageCompletionHandler)completionBlock
Parameters
- completionBlock
The completion block to call when the thumbnail is available
Return Value
YES in case of success, NO if for some reason the thumbnail cannot be retrieved.
Availability
Version 5.0
Discussion
Asynchronously return the context image thumbnail (if any).
The block is called on the main thread when the thumbnail is available.
Declared In
VDARContext.h
downloadContextFile:progress:completion:
Asynchronously download (if needed) the context file identified by its filename.
- (BOOL)downloadContextFile:(NSString *)filename progress:(VDARContextFileDownloadProgressHandler)progressBlock completion:(VDARContextFileDownloadCompletionHandler)completionBlock
Parameters
- filename
The filename of the file to download.
- progressBlock
The block that is called to update the caller of the progression of the file download
- completionBlock
The completion block to call when the file is available
Return Value
YES if the filename is correct and if the download can start, NO otherwise.
Availability
Version 5.0
Discussion
Asynchronously download (if needed) the context file identified by its filename.
If the file has already been downloaded, the file is cached and the completion callback is called within the next run loop iteration.
The filename has to be in the array VDARContext.contextFiles otherwise a false value is returned.
Warning: Note this is not safe to call this method twice, without waiting for the first call to finish.
The different blocks are called on the main thread.
Declared In
VDARContext.h
executeJSInContext:
Execute and evaluate the JS string in the Context AnnotationJS system.
- (BOOL)executeJSInContext:(NSString *)jsString
Parameters
- jsString
The Javascript String to evaluate
Return Value
YES if it succeeeded, NO otherwise. NO can occur if the context is not loaded and executed in memory.
Availability
Version 5.1.9.4
Discussion
Execute and evaluate the JS string in the Context AnnotationJS system.
Declared In
VDARContext.h