| Modifier and Type | Method and Description |
|---|---|
InfantiumResponse |
addDynamicField(DynamicField d_field)
Add new DynamicField
|
InfantiumResponse |
addDynamicFields(List<DynamicField> d_fields)
Add a List of DynamicFields that will appear in the Gameplay.
|
InfantiumResponse |
addElement(Element element)
Add new Element
|
InfantiumResponse |
addElements(List<Element> elements)
Add a List of Elements that will appear in the Gameplay.
|
InfantiumResponse |
addEvent(Event event)
Add an Event to the current Rawdata.
|
InfantiumResponse |
addEvents(List<Event> events)
Add a list of Events to the current Rawdata.
|
InfantiumResponse |
addGoal(Goal goal)
Add a Goal to the current Rawdata.
|
InfantiumResponse |
addGoals(List<Goal> goals)
Add a list of Goals to the current Rawdata.
|
void |
clearReceivers()
Very specific method to be called only by Apps that cannot overwrite the onPause and onResume
Android methods.
|
InfantiumResponse |
closeGameplay()
End of the gameplay (Ebook or Game).
|
InfantiumResponse |
createGameplay()
Creates a new Gameplay obtaining the gameplay_id and the gameplay_uuid.
|
InfantiumResponse |
createGameplay(String subcontent_uuid)
Creates a new Gameplay obtaining the gameplay_id and the gameplay_uuid.
|
static InfantiumSDK |
getInfantiumSDK(Context context)
This function exposes the unique instance whereby InfantiumSDK can be accessed.
|
static InfantiumSDK |
getInfantiumSDK(Context context,
String server,
Boolean debug)
This function exposes the unique instance whereby InfantiumSDK can be accessed.
|
void |
getPlayerUUIDFromApp()
Called by OnResume to get the player from the App
|
InfantiumResponse |
newBasicInteraction(String t,
String goal_type)
Adds an interaction with the screen.
|
InfantiumResponse |
newBasicInteraction(String t,
String object_type,
String goal_type)
Adds an interaction with the screen.
|
InfantiumResponse |
newBasicInteraction(String t,
String object_type,
String goal_type,
Integer lifetime)
Adds an interaction with the screen.
|
InfantiumResponse |
newBasicInteraction(String t,
String object_type,
String goal_type,
Integer n_concurrent_oks,
Integer n_concurrent_kos)
Adds an interaction with the screen.
|
InfantiumResponse |
newBasicInteraction(String t,
String object_type,
String goal_type,
Integer lifetime,
Integer n_concurrent_oks,
Integer n_concurrent_kos)
Adds an interaction with the screen.
|
void |
onPauseInfantium()
Method to be called when overwriting the onPause method of Android
|
void |
onResumeInfantium()
Method to be called when overwriting the onResume method of Android
|
void |
restartRawdata()
Restarts and cleans all the data in the Rawdata
|
Boolean |
returnToInfantiumApp(Activity activ)
Returns the user interaction to the Infantium App
|
void |
sendEbookRawData(int num_page,
boolean text,
boolean read_to_me)
Send the EBook Rawdata.
|
void |
sendGameRawData()
Send the Game Rawdata.
|
void |
sendVideoRawdata(int view_time,
int pause,
int rewind,
int forward,
int replay)
Set the rawdata of the Video.
|
InfantiumResponse |
setContentAppUUID(String contentapp_uuid)
Set Contentapp_uuid from the game or ebook.
|
InfantiumResponse |
setContentUUID(String content_uuid)
Set the content_uuid from the video or ebook
|
void |
setDeveloperCredentials(String api_user,
String api_key)
Set the developer's credentials in order to contact with the API.
|
void |
setDeveloperHandler(InfantiumAsyncResponseHandler handler)
In this function the developer defines a InfantiumAsyncResponseHandler where all the asyncronous communications will be received.
|
void |
setDeviceInfo(int heightPixels,
int widthPixels)
Set the device dimensions
|
InfantiumResponse |
setPlayerUUID(String player_uuid)
Obtain the information from the player and his related tutor.
|
static void |
setResumeAndPauseDeactivated(Boolean resumeAndPause) |
InfantiumResponse |
setSubContentUUID(String subcontent_uuid)
Set the subContentapp_uuid from the game.
|
InfantiumResponse |
startPlaying()
Restarts the Rawdata timestamp.
|
InfantiumResponse |
triggerExistingEvent(String event_id)
Adds the triggering of an existing event
|
InfantiumResponse |
triggerExistingEvent(String event_id,
String triggered_by)
Adds the triggering of an existing event
|
public static final String version
public static InfantiumSDK getInfantiumSDK(Context context)
context - public static InfantiumSDK getInfantiumSDK(Context context, String server, Boolean debug)
context - server - debug - public static void setResumeAndPauseDeactivated(Boolean resumeAndPause)
resumeAndPause - public void getPlayerUUIDFromApp()
public Boolean returnToInfantiumApp(Activity activ)
returnToInfantiumApp in interface ISDKactiv - The current activity (this) of the app including the SDKpublic void setDeviceInfo(int heightPixels,
int widthPixels)
setDeviceInfo in interface ISDKwidthPixels - Width of the device.heightPixels - Height of the device.IllegalArgumentException.public void setDeveloperCredentials(String api_user, String api_key)
setDeveloperCredentials in interface ISDKapi_user - The developer's personal user.api_key - The developer's personal key.public void setDeveloperHandler(InfantiumAsyncResponseHandler handler)
setDeveloperHandler in interface ISDKhandler - The asyncronous handler instance.public InfantiumResponse setContentAppUUID(String contentapp_uuid)
setContentAppUUID in interface ISDKcontentapp_uuid - - The uuid of the contentapp.public InfantiumResponse setContentUUID(String content_uuid)
setContentUUID in interface ISDKcontent_uuid - - The UUID of the content.public InfantiumResponse setSubContentUUID(String subcontent_uuid)
setSubContentUUID in interface ISDKsubcontent_uuid - - The UUID of the subcontentapp.public InfantiumResponse setPlayerUUID(String player_uuid)
setPlayerUUID in interface ISDKplayer_uuid - - The UUID of the player.setContentAppUUID(String)public InfantiumResponse createGameplay(String subcontent_uuid)
createGameplay in interface ISDKsubcontent_uuid - - The UUID of the subcontent.public InfantiumResponse createGameplay()
createGameplay in interface ISDKsetContentUUID(String)public InfantiumResponse closeGameplay()
closeGameplay in interface ISDKcreateGameplay(String),
createGameplay()public InfantiumResponse startPlaying()
startPlaying in interface ISDKpublic InfantiumResponse addElement(Element element)
addElement in interface ISDKelement - - The element object.public InfantiumResponse addElements(List<Element> elements)
addElements in interface ISDKelements - - A list of Elements.public InfantiumResponse addDynamicField(DynamicField d_field)
addDynamicField in interface ISDKd_field - - The DynamicField object.public InfantiumResponse addDynamicFields(List<DynamicField> d_fields)
addDynamicFields in interface ISDKd_fields - - A list of DynamicFields.public void sendVideoRawdata(int view_time,
int pause,
int rewind,
int forward,
int replay)
sendVideoRawdata in interface ISDKview_time - - View time in milliseconds.pause - - Amount of times the video has pausedrewind - - Amount of times the video been rewindedforward - - Amount of times the video been forwardedreplay - - Amount of times the video been replayedsetContentUUID(String)public void sendEbookRawData(int num_page,
boolean text,
boolean read_to_me)
sendEbookRawData in interface ISDKnum_page - - The page number of the book.text - - true if the page contains text and false if not.read_to_me - - true if the book reads to the player or false if not.setContentAppUUID(String),
createGameplay()public void sendGameRawData()
sendGameRawData in interface ISDKsetContentAppUUID(String),
createGameplay(String)public void restartRawdata()
restartRawdata in interface ISDKpublic void onPauseInfantium()
onPauseInfantium in interface ISDKpublic void onResumeInfantium()
onResumeInfantium in interface ISDKpublic void clearReceivers()
clearReceivers in interface ISDKpublic InfantiumResponse addGoal(Goal goal)
public InfantiumResponse addGoals(List<Goal> goals)
public InfantiumResponse addEvent(Event event)
public InfantiumResponse addEvents(List<Event> events)
public InfantiumResponse newBasicInteraction(String t, String goal_type)
newBasicInteraction in interface ISDKt - - The type of the interaction. Check the Dev Center for more info.goal_type - - The goal which had to be achieved by this movement.public InfantiumResponse newBasicInteraction(String t, String object_type, String goal_type)
newBasicInteraction in interface ISDKt - - The type of the interaction. Check the Dev Center for more info.object_type - - The object/element of interaction.goal_type - - The goal which had to be achieved by this movement.public InfantiumResponse newBasicInteraction(String t, String object_type, String goal_type, Integer lifetime)
newBasicInteraction in interface ISDKt - - The type of the interaction. Check the Dev Center for more info.object_type - - The object/element of interaction.goal_type - - The goal which had to be achieved by this movement.lifetime - - The available timespan the kid had to make this choice, in milliseconds.public InfantiumResponse newBasicInteraction(String t, String object_type, String goal_type, Integer n_concurrent_oks, Integer n_concurrent_kos)
newBasicInteraction in interface ISDKt - - The type of the interaction. Check the Dev Center for more info.object_type - - The object/element of interaction.goal_type - - The goal which had to be achieved by this movement.n_concurrent_oks - - The amount of other correct solutionsn_concurrent_kos - - The amount of other incorrect solutionspublic InfantiumResponse newBasicInteraction(String t, String object_type, String goal_type, Integer lifetime, Integer n_concurrent_oks, Integer n_concurrent_kos)
newBasicInteraction in interface ISDKt - - The type of the interaction. Check the Dev Center for more info.object_type - - The object/element of interaction.goal_type - - The goal which had to be achieved by this movement.lifetime - - The available timespan the kid had to make this choice, in milliseconds.n_concurrent_oks - - The amount of other correct solutionsn_concurrent_kos - - The amount of other incorrect solutionspublic InfantiumResponse triggerExistingEvent(String event_id)
triggerExistingEvent in interface ISDKevent_id - -public InfantiumResponse triggerExistingEvent(String event_id, String triggered_by)
triggerExistingEvent in interface ISDKevent_id - -triggered_by - -