com.craftar
Class CraftARGenericSDK
- java.lang.Object
-
- com.craftar.CraftARGenericSDK
-
- Direct Known Subclasses:
- CraftARSDK
public abstract class CraftARGenericSDK extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
CraftARGenericSDK.OnFinderTimeoutListener
Interface to receive the finder-mode events
-
Constructor Summary
Constructors Constructor and Description CraftARGenericSDK()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract CraftARCamera
getCamera()
Returns theCraftARCamera
object that provides access to camera level operations.SearchController
getSearchController()
void
init(Context c)
Initialize the SDK with this context.boolean
isFinding()
Returns whether the SDK's Finder mode is activeabstract void
setSearchController(SearchController searchController)
Set the controller that will receive messages to perform visual search based on the SDK commands (singleShotSearch, startFinder, stopFinder).abstract void
singleShotSearch()
Takes a picture and performs a visual search using theSearchController
void
startFinder()
Starts a visual search session in Finder Mode passing the camera capture frames to theSearchController
.void
startFinder(long timeMillis, CraftARGenericSDK.OnFinderTimeoutListener listener)
Start the finder mode for @param milliseconds, or until stopFinder() is called.void
stopFinder()
Stops the visual search session if started.
-
-
-
Method Detail
-
init
public void init(Context c)
Initialize the SDK with this context. Note that you have to initialize the SDK always at the beginning, before performing any other operation with the SDK. You will typically do this at the beginning of youronPostCreate()
method in yourCraftARActivity
CraftARSDK.Instance().init(getApplicationContext());
-
singleShotSearch
public abstract void singleShotSearch()
Takes a picture and performs a visual search using theSearchController
-
startFinder
public void startFinder()
Starts a visual search session in Finder Mode passing the camera capture frames to theSearchController
.
-
stopFinder
public void stopFinder()
Stops the visual search session if started.
-
startFinder
public void startFinder(long timeMillis, CraftARGenericSDK.OnFinderTimeoutListener listener)
Start the finder mode for @param milliseconds, or until stopFinder() is called.
-
isFinding
public boolean isFinding()
Returns whether the SDK's Finder mode is active
-
getCamera
public abstract CraftARCamera getCamera()
Returns theCraftARCamera
object that provides access to camera level operations.
-
setSearchController
public abstract void setSearchController(SearchController searchController)
Set the controller that will receive messages to perform visual search based on the SDK commands (singleShotSearch, startFinder, stopFinder).
-
getSearchController
public SearchController getSearchController()
-
-