Package fi.moprim.tmd.sdk
This package includes classes, interfaces, and enumerations related to the TMD for our Android SDK.
Moprim TMD Android SDK requires to initialize the SDK first.
Initialization should happen as early as possible, and it requires connection to the Internet.
The easiest way to add the initialization code to an Application class.
import android.app.Application; import android.content.Context; import fi.moprim.tmd.sdk.TMD; import fi.moprim.tmd.sdk.TmdConfigBuilder; public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); TmdConfigBuilder builder = new TmdConfigBuilder(this) .setSdkConfigEndPoint(getString(R.string.tmd_sdk_config_endpoint)) .setSdkConfigKey(getString(R.string.tmd_sdk_config_key)); // Initialise the TMD TMD.init(this, builder.build()); } }Then you can start and stop the TMD at your own convenience:
- To start see
TMD.startForeground(android.content.Context, int, android.app.Notification)
- To stop see
TMD.stop(android.content.Context)
- To check if the TMD is running:
TMD.isTmdRunning(android.content.Context)
TmdCloudApi.correctActivity(android.content.Context, fi.moprim.tmd.sdk.model.TmdActivity, java.lang.String)
-
Class Summary Class Description TMD Use this class to initialize the TMDTMD.init(Context, TmdConfig)
as soon as possible in yourApplication
subclassApplication.onCreate()
method.TmdCloudApi This class offers static functions to interact with the Moprim Cloud.TmdConfig This class embodies the core variable that are needed to initiate any TMD processesTmdConfig.Builder TmdContentProvider The TmdContentProvider should enable access to - TmdActivity data - TmdStats data - TmdStatus data (idle, etc..)