Pikkart-AR SDK  3.5
Android SDK References
com.pikkart.ar.geo.GeoFragment Class Reference

The basic component of the Pikkart Geolocalized Augmented Reality SDK. More...

Inherits com.pikkart.ar.recognition.RecognitionFragment.

Public Member Functions

 GeoFragment ()
 
 GeoFragment (IArGeoListener geoListener)
 
 GeoFragment (IArGeoListener geoListener, List< GeoElement > geoElements)
 
 GeoFragment (IArGeoListener geoListener, MarkerViewAdapter augmentedMarkerViewAdapter, MarkerViewAdapter mapMarkerViewAdapter)
 
void setGeoListener (IArGeoListener geoListener)
 
void setGeoElements (List< GeoElement > geoElements)
 
void setMarkerViewAdapters (MarkerViewAdapter augmentedMarkerViewAdapter, MarkerViewAdapter mapMarkerViewAdapter)
 
void setLocationUpdateParameters (long minTime, float minDistance)
 
void refreshGeoElements ()
 
void deselectMarkers ()
 
void DisableGeoAR ()
 Disable the geolocation ar view.
 
void EnableGeoAR ()
 Enable the geolocation ar view.
 
boolean IsGeoAREnabled ()
 Is the geolocation ar view enabled.
 
void DisableGeoMap ()
 Disable the map.
 
void EnableGeoMap ()
 Enable the map.
 
boolean IsGeoMapEnabled ()
 Is the geolocation map enabled.
 
- Public Member Functions inherited from com.pikkart.ar.recognition.RecognitionFragment
void startRecognition (RecognitionOptions recognitionOptions, IRecognitionListener recognitionCallback)
 Starts the recognition process with the selected RecognitionOptions and IRecognitionListener. More...
 
void stopRecognition ()
 Stop the active recognition process manually without closing the camera. More...
 
void changeRecognitionOptions (RecognitionOptions recognitionOptions)
 Changes the current RecognitionOptions without stopping the recognition process. More...
 
void setMarkerCacheSize (int markerCacheSize)
 Set the max number of markers to keep locally. More...
 
boolean isRecognitionActive ()
 Returns if the recognition is currently running. More...
 
boolean enableTorch ()
 Turn on the torch of the device. More...
 
boolean disableTorch ()
 Turn off the torch of the device. More...
 
void setFocusMode (String mode)
 Set the selected focus mode for the camera if available for the device. More...
 
String getFocusMode ()
 Retrieve the currently set focus mode. More...
 
String GetAppPath ()
 Returns the local storage application path.
 
void DisableRecognition ()
 Disable the recognition system.
 
void EnableRecognition ()
 Enables the recognition system.
 
boolean IsRecognitionEnabled ()
 Is the recognition system enabled.
 

Additional Inherited Members

- Static Public Member Functions inherited from com.pikkart.ar.recognition.RecognitionFragment
static boolean isTracking ()
 Returns if the Pikkart-AR SDK is currently tracking a marker. More...
 
static Marker getCurrentMarker ()
 Returns the currently tracked marker. More...
 
static float [] getCurrentProjectionMatrix ()
 Returns the current projection matrix and make it available for rendering purpose. More...
 
static float [] getCurrentModelViewMatrix ()
 Returns the current modelview matrix and make it available for rendering purpose. More...
 
static void renderCamera (int viewportWidth, int viewportHeight, int angle)
 Create a texture and render the current camera frame. More...
 
- Protected Attributes inherited from com.pikkart.ar.recognition.RecognitionFragment
RecognitionManager _recognitionManager = null
 The recognition manager.
 
View _fragmentView = null
 This fragment view root.
 
AssetManager asset_manager =null
 The asset manager.
 
RecognitionOptions requestedRecognitionOptions =null
 requested recognition options.
 
IRecognitionListener requestedRecognitionCallback =null
 The recognition listener (usually the calling activity).
 

Detailed Description

GeoFragment is a an Android Fragment that controls the camera and the map in order to show your geolocalized marker correctly.

At its creation it opens the camera and loads the map.

It exposes simple methods to manage the geolocalized marker to show and the interaction with user and sensor input.

Constructor & Destructor Documentation

◆ GeoFragment() [1/4]

com.pikkart.ar.geo.GeoFragment.GeoFragment ( )

Default constructor. It requires an explicit call to setGeoElements() in order to show some geolocalized marker. It doesn't set any listener to user interaction, unless setGeoListener() is called.

◆ GeoFragment() [2/4]

com.pikkart.ar.geo.GeoFragment.GeoFragment ( IArGeoListener  geoListener)

Overloaded constructor. It requires an explicit call to setGeoElements() in order to show some geolocalized marker.

Parameters
geoListenerAn object that implements IArGeoListener interface.

◆ GeoFragment() [3/4]

com.pikkart.ar.geo.GeoFragment.GeoFragment ( IArGeoListener  geoListener,
List< GeoElement geoElements 
)

Overloaded constructor. Sets a default list of geoElements.

Parameters
geoListenerAn object that implements IArGeoListener interface.
geoElementsA List of GeoElement associated to the markers to show.

◆ GeoFragment() [4/4]

com.pikkart.ar.geo.GeoFragment.GeoFragment ( IArGeoListener  geoListener,
MarkerViewAdapter  augmentedMarkerViewAdapter,
MarkerViewAdapter  mapMarkerViewAdapter 
)

Overloaded constructor.

Parameters
geoListenerAn object that implements IArGeoListener interface.
augmentedMarkerViewAdapterAn object that can modify augmented marker icon.
mapMarkerViewAdapterAn object that can modify map marker icon.

Member Function Documentation

◆ setGeoListener()

void com.pikkart.ar.geo.GeoFragment.setGeoListener ( IArGeoListener  geoListener)
Parameters
geoListenerAn object that implements IArGeoListener interface.

◆ setGeoElements()

void com.pikkart.ar.geo.GeoFragment.setGeoElements ( List< GeoElement geoElements)
Parameters
geoElementsA list of GeoElement associated to the markers to show.

◆ setMarkerViewAdapters()

void com.pikkart.ar.geo.GeoFragment.setMarkerViewAdapters ( MarkerViewAdapter  augmentedMarkerViewAdapter,
MarkerViewAdapter  mapMarkerViewAdapter 
)
Parameters
augmentedMarkerViewAdapterAn object that can modify augmented marker icon.
mapMarkerViewAdapterAn object that can modify map marker icon.

◆ setLocationUpdateParameters()

void com.pikkart.ar.geo.GeoFragment.setLocationUpdateParameters ( long  minTime,
float  minDistance 
)
Parameters
minTimeA long that indicates the minimum update time in milliseconds.
minDistanceA float that indicates the movement required for updating in meters.

◆ refreshGeoElements()

void com.pikkart.ar.geo.GeoFragment.refreshGeoElements ( )

Force the redraw of geoelements

◆ deselectMarkers()

void com.pikkart.ar.geo.GeoFragment.deselectMarkers ( )

Force each selected marker to be deselected.