public final class

VDARContext

extends Observable
java.lang.Object
   ↳ java.util.Observable
     ↳ com.vidinoti.android.vdarsdk.VDARContext

Class Overview

Represents a VDARContext fetched from the ARManager platform

Summary

Nested Classes
class VDARContext.ContextObserverUpdateInfo Describe the status of a current file download action on a context 
Public Methods
void activate()
Activate and show the content tight to this context.
boolean equals(Object o)
Return true if the receiver is equal to the passed object.
boolean getContextFile(String filename, Observer obs)
Asynchronously download (if needed) the context file identified by its filename.
ArrayList<String> getContextFiles()
Return the list of String representing the different filenames of the files attached to this context.
Bitmap getContextImageThumbnail()
Retrieve the context thumbnail Note that the context thumbnail is cached.
void getContextImageThumbnailAsynchronously(Observer obs)
Retrieve the context thumbnail (if available) and call the observer with the retrieved Bitmap when done.
String getDescription()
Return the context description.
String getImageHiResURL()
Return the high resolution image URL of this context.
String getImageThumbnailURL()
Return the thumbnail image URL of this context.
Date getLastModifiedDate()
Return the date at which this context was lately published and made available to the public.
String getName()
Return the name of the context
String getNotificationMessage()
Return the notification message this context has generated.
String getNotificationTitle()
Return the notification title this context has generated.
String getRemoteID()
Return the remote ID of the context
void ignore()
Mark the notification generated by this context as ignored so that it doesn't show up again.
boolean isContextImageThumbnailDownloaded()
return true if the context image thumbnail has been downloaded
void stop()
Stops the content if running
String toString()
[Expand]
Inherited Methods
From class java.util.Observable
From class java.lang.Object

Public Methods

public void activate ()

Activate and show the content tight to this context. Also mark the notification as read.

public boolean equals (Object o)

Since: API Level

Return true if the receiver is equal to the passed object. Two contexts are considered to be equal if they have the same remote ID or if they have the same local ID.

Parameters
o The object to compare the receiver with
Returns
  • true if both objects are equal, false otherwise.

public boolean getContextFile (String filename, Observer obs)

Asynchronously download (if needed) the context file identified by its filename.

If the file has already been downloaded, the file is cached and the observer is directly called.

The filename has to be in the array getContextFiles() otherwise a false value is returned.

The observer is called on the main UI thread.

Parameters
filename The filename of the file to download.
obs The observer that will be called for progress updates and when the download is finished. The data object of the observer is a class of type #VDARContext.ContextObserverUpdateInfo
Returns
  • true if the filename is correct and if the download can start, false otherwise.

public ArrayList<String> getContextFiles ()

Return the list of String representing the different filenames of the files attached to this context.

Returns
  • the list of String representing the different filenames of the files attached to this context

public Bitmap getContextImageThumbnail ()

Retrieve the context thumbnail Note that the context thumbnail is cached. Therefore calling multiple time this method does not trigger multiple network transfers. Warning: You should prefer to use getContextImageThumbnailAsynchronously(Observer) if you don't want to block the UI.

Returns
  • The bitmap of the

public void getContextImageThumbnailAsynchronously (Observer obs)

Retrieve the context thumbnail (if available) and call the observer with the retrieved Bitmap when done. Note that the context thumbnail is cached. Therefore calling multiple time this method does not trigger multiple network transfers.

Parameters
obs The observer to call when the image has been fetched.

public String getDescription ()

Return the context description. If not description is provided, the empty string "" is returned.

Returns
  • the context description

public String getImageHiResURL ()

Return the high resolution image URL of this context.

Returns
  • the high resolution image URL of this context.

public String getImageThumbnailURL ()

Return the thumbnail image URL of this context.

Returns
  • the thumbnail image URL of this context.

public Date getLastModifiedDate ()

Return the date at which this context was lately published and made available to the public.

Returns
  • the date at which this context was lately published and made available to the public.

public String getName ()

Return the name of the context

Returns
  • The name of the context

public String getNotificationMessage ()

Return the notification message this context has generated.

Returns
  • the notification message this context has generated.

public String getNotificationTitle ()

Return the notification title this context has generated.

Returns
  • the notification title this context has generated.

public String getRemoteID ()

Return the remote ID of the context

Returns
  • The remote ID of the context

public void ignore ()

Mark the notification generated by this context as ignored so that it doesn't show up again.

public boolean isContextImageThumbnailDownloaded ()

return true if the context image thumbnail has been downloaded

Returns
  • true if the context image thumbnail has been downloaded

public void stop ()

Stops the content if running

public String toString ()

Since: API Level