public class

OsAdapter

extends Object
implements OsListener
java.lang.Object
   ↳ sg.com.temasys.skylink.sdk.adapter.OsAdapter

Summary

Public Constructors
OsAdapter()
Public Methods
void onDenyPermission(Intent intent, int requestCode, SkylinkInfo skylinkInfo)
This is triggered when Android Intent based permission has been denied for the usage of a particular part of the SDK.
void onGrantPermission(Intent intent, int requestCode, SkylinkInfo skylinkInfo)
This is triggered when Android Intent based permission has been granted for the usage of a particular part of the SDK.
void onRequirePermission(Intent intent, int requestCode, SkylinkInfo skylinkInfo)
This is triggered when an Android Intent is required to use a part of the SDK.
[Expand]
Inherited Methods
From class java.lang.Object
From interface sg.com.temasys.skylink.sdk.listener.OsListener

Public Constructors

public OsAdapter ()

Public Methods

public void onDenyPermission (Intent intent, int requestCode, SkylinkInfo skylinkInfo)

This is triggered when Android Intent based permission has been denied for the usage of a particular part of the SDK.

public void onGrantPermission (Intent intent, int requestCode, SkylinkInfo skylinkInfo)

This is triggered when Android Intent based permission has been granted for the usage of a particular part of the SDK.

public void onRequirePermission (Intent intent, int requestCode, SkylinkInfo skylinkInfo)

This is triggered when an Android Intent is required to use a part of the SDK. For e.g., the intent from android.app.Activity#onActivityResult(int, int, Intent) generated from android.app.Activity#startActivityForResult(Intent, int), using the intent of android.media.projection.MediaProjectionManager#createScreenCaptureIntent, is required before screen capture can be performed. When received, app should use the intent and requestCode provided here to call android.app.Activity#startActivityForResult(Intent, int). Once the corresponding android.app.Activity#onActivityResult(int, int, Intent) is received, app should pass the parameters (requestCode, resultCode, Intent) to the SDK's processActivityResult(int, int, Intent). The SDK will process this result and also notify app via onGrantPermission(Intent, int, SkylinkInfo) or onDenyPermission(Intent, int, SkylinkInfo).

Parameters
intent An Intent to be passed to android.app.Activity#startActivityForResult(Intent, int).
requestCode An unique integer that represents this permission request. This is to be used as the requestCode when calling Android's android.app.Activity#startActivityForResult(Intent, int).
skylinkInfo SkylinkInfo that explains why this permission is required. Further info can be obtained by calling getDescription(). Based on this info, an explanation might be crafted.