Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
0.0.7
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ricardobrg authored Jan 26, 2023
2 parents 38995b0 + fcc4a21 commit 868192f
Show file tree
Hide file tree
Showing 106 changed files with 2,645 additions and 123 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext.flutterEngine = "1.0.0-c08d7d5efc9aa6eb3c30cfb3be6dc09bca5e7631"
ext.sdkVersion = "0.0.24"
ext.sdkVersion = "0.0.25"
repositories {
mavenCentral()
}
Expand All @@ -20,8 +20,8 @@ android {
compileSdk 33
defaultConfig {
minSdk 21
versionCode 3
versionName "0.0.6"
versionCode 4
versionName "0.0.7"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.mytiki.tiki_sdk_android">
<!--
~ Copyright (c) TIKI Inc.
~ MIT license. See LICENSE file in root directory.
-->

</manifest>
<manifest package="com.mytiki.tiki_sdk_android"/>
5 changes: 5 additions & 0 deletions app/src/main/kotlin/com/mytiki/tiki_sdk_android/TikiSdk.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import com.squareup.moshi.JsonClass
Expand All @@ -10,5 +15,4 @@ enum class TikiSdkDataTypeEnum {
data_point,
data_stream,
data_pool;

}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel

import android.util.Log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.req

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.req

import com.mytiki.tiki_sdk_android.TikiSdkDestination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.req

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.req

import com.mytiki.tiki_sdk_android.TikiSdkDestination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.req

import com.mytiki.tiki_sdk_android.TikiSdkDataTypeEnum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.req

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.rsp

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.rsp

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.rsp

import com.mytiki.tiki_sdk_android.TikiSdkConsent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.rsp

import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.tiki_platform_channel.rsp

import com.mytiki.tiki_sdk_android.TikiSdkOwnership
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android.util

import com.squareup.moshi.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import com.mytiki.tiki_sdk_android.util.TimeStampToDateAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import com.squareup.moshi.JsonAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import com.squareup.moshi.JsonAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/

package com.mytiki.tiki_sdk_android

import com.squareup.moshi.JsonAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/
package com.mytiki.tiki_sdk_android.tiki_platform_channel.rsp

package com.mytiki.tiki_sdk_android.tiki_platform_channel.rsp

import com.squareup.moshi.JsonAdapter
import com.squareup.moshi.Moshi
Expand Down
33 changes: 23 additions & 10 deletions doc/guide/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ repositories {

Add the dependency in your App's `build.gradle` file (`PROJECT_ROOT/app/build.gradle`)
```
implementation("com.mytiki:tiki-sdk-android:0.0.5")
implementation("com.mytiki:tiki-sdk-android:1.0.0")
```

### Usage

#### 1. [Sign up](https://console.mytiki.com) (free) for a TIKI developer account to get an API ID.

#### 2. Construct the [TIKI SDK](tiki-sdk-android-tiki-sdk)
#### 2. Initialize the [TIKI SDK](tiki-sdk-android-tiki-sdk)

_Note: Must be called from the main UI thread_

Configuration parameters:

Expand All @@ -56,7 +58,9 @@ Configuration parameters:
Example:

```
val tiki = TikiSdk().init("565b3268-cdc0-4e5c-94c8-5d8f53d4577c", "com.mycompany.myproduct", context)
MainScope().launch {
val tiki = TikiSdk().init("565b3268-cdc0-4e5c-94c8-5d8f53d4577c", "com.mycompany.myproduct", applicationContext).await()
}
```

#### 3. Assign ownership
Expand All @@ -67,7 +71,7 @@ Parameters:
An identifier in your system corresponding to the raw data. _i.e. a user_id_


- **type &#8594; String**
- **type &#8594; [TikiSdkDataTypeEnum](tiki-sdk-android-tiki-sdk-data-type-enum)**
`"data_point"`, `"data_pool"`, or `"data_stream"`


Expand All @@ -91,7 +95,10 @@ Returns:
Example:

```
val oid = tiki.assignOwnership("12345", TikiSdkDataTypeEnum.data_point, listOf("email_address"))
MainScope().launch {
...
val oid = tiki.assignOwnership("12345", TikiSdkDataTypeEnum.data_point, listOf("email_address"))
}
```

#### 4. Modify consent
Expand All @@ -114,7 +121,7 @@ Parameters:
An optional definition of a reward promised to the user in exchange for consent.


- **expiry &#8594; [LocalDateTime](https://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/kotlinx.datetime/-local-date-time/-local-date-time.html)? = null**
- **expiry &#8594; Date? = null**
The date upon which the consent is no longer valid. If not set, consent is perpetual.

Returns:
Expand All @@ -124,7 +131,10 @@ Returns:

Example:
```
val consent = tiki.modifyConsent(oid, TikiSdkDestination(listOf("*"), listOf("*")))
MainScope().launch {
...
val consent = tiki.modifyConsent(oid, TikiSdkDestination(listOf("*"), listOf("*")))
}
```

#### 5. Apply consent
Expand Down Expand Up @@ -154,7 +164,10 @@ Parameters:

Example:
```
applyConsent("12345", TikiSdkDestination(listOf("*"), listOf("*")), {
print("Consent Approved. Send data to backend.")
});
MainScope().launch {
...
tiki.applyConsent("12345", TikiSdkDestination(listOf("*"), listOf("*")), {
print("Consent Approved. Send data to backend.")
});
}
```
2 changes: 1 addition & 1 deletion doc/ref/KotlinDocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Kotlin Docs
category: 6386a02f5b7bf00510590f34
slug: tiki-sdk-android-docs
hidden: false
order: 6
order: 7
type: link
link_url: https://tiki-sdk-android.docs.mytiki.com/
---
9 changes: 7 additions & 2 deletions doc/ref/Source.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
title: Source Code category: 6386a02f5b7bf00510590f34 slug: tiki-sdk-android-source hidden: false
order: 5 type: link link_url: https://github.com/tiki/tiki-sdk-android
title: Source Code
category: 6386a02f5b7bf00510590f34
slug: tiki-sdk-android-source
hidden: false
order: 6
type: link
link_url: https://github.com/tiki/tiki-sdk-android
---
Loading

0 comments on commit 868192f

Please sign in to comment.