SCMEnvironment¶
- public abstract class SCMEnvironment¶
Event provider for the
ReaderEventsinterface. A long polling strategy is used to receive new events from the SCM HTTP server. Every registeredReaderEventsis notified in case of event with the appropriate method.This implementation of environment exists for legacy reason. Use
SCMEmbedEnvironmentto create a new environment to use.Any number of
SCMEnvironment, as well as SCWS objects from the javascript API, can receive copies of the same event from the SCM HTTP server. However, a same environment must not be used both in java and javascript (through anandroid.webkit.WebView) APIs.
Fields¶
aesKey¶
publicKey¶
Methods¶
addReaderEventListener¶
- public void addReaderEventListener(ReaderEvents listener)¶
Registers a new
ReaderEvents.- Parameters:
listener – The listener object whose methods will be called when an event occurs.
areCertificatesRegistered¶
- public boolean areCertificatesRegistered()¶
Gets whether certificates are registered or not.
- Returns:
trueif certificates are registered,falseotherwise.
getPublicKey¶
getReader¶
getReaders¶
registerCertificates¶
- public void registerCertificates(Token token)¶
Registers certificates.
Certificates are stored in app-specific storage. Registered certificates will be further used in SSL client certificate request through
SSLWebViewClient.- Parameters:
token – the token to register certificates for.
- Throws:
SCMException– if certificates registration failed.
See also:
SCMEnvironment.unregisterCertificates()
releaseBluetoothPeripheral¶
- public boolean releaseBluetoothPeripheral()¶
Releases the current connected bluetooth peripheral.
- Returns:
return : true if the device has been released correctly false if the device does not exist and could not be released
removeReaderEventListener¶
- public void removeReaderEventListener(ReaderEvents listener)¶
Removes a
ReaderEventslistener.- Parameters:
listener – The listener object to remove.
startBluetoothScan¶
- public boolean startBluetoothScan()¶
Starts bluetooth scan.
- Throws:
SCMException– if bluetooth initialization failed or if a bluetooth peripheral is already paired and connected.
- Returns:
falseif scanning has already been started,trueotherwise.
startRemoteLogsRecording¶
- public void startRemoteLogsRecording(String userId)¶
Starts to record logs on Idopte remote server.
Note that logs are sensitive data and are sent through
HTTPSprotocol.userIdmust be a valid code provided by your administrator.Calling this function will fail if a
com.idopte.tools.Logis set up throughcom.idopte.tools.Log.setLog(com.idopte.tools.Log).- Parameters:
userId – id of user given by your administrator, as a
Stringof digits.
stopBluetoothScan¶
- public boolean stopBluetoothScan()¶
Stops bluetooth scan.
- Throws:
SCMException– if bluetooth initialization failed.
- Returns:
falseif bluetooth has already been stopped,trueotherwise.
unregisterCertificates¶
- public void unregisterCertificates()¶
Clears the list of registered certificates.
- Throws:
SCMException– if certificates unregistration failed.