android {
defaultConfig {
minSdkVersion 26
}
}dependencies {
implementation 'com.kiwrious.sdk.android:kiwrious-android-library:1.0.2'
} repositories {
mavenCentral()
}<manifest>
<application>
<activity>
<!-- add new intent filter -->
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<!-- add new meta data -->
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</activity>
</application>
</manifest>import org.ahlab.kiwrious.android.KiwriousReader;
import android.content.Context;Context context = getApplicationContext(); // get your application context
KiwriousReader kiwriousReader = KiwriousReader.getInstance(context); // pass it to kiwrious librarykiwriousReader.startSerialReader();kiwriousReader.stopSerialReader();byte[] getRawValues()float getConductivity()
long getResistance()
int getVoc()
int getCo2()
float getUV()
float getLux()
float getHumidity()
float getTemperature()
int getAmbientTemperature()
int getInfraredTemperature()boolean isHumidityOnline()
boolean isUvOnline()
boolean isConductivityOnline()
boolean isVocOnline()
boolean isBodyTempOnline()String getConnectedSensorName()- Update
intofield value insidecopyAndroidArchiveBinarygradle task - Run
gradle copyAndroidArchiveBinary
- create a signing key (RSA and RSA, 4096 bits long)
gpg --full-gen-key
- send key to a key server (keyserver.ubuntu.com, keys.openpgp.org, hkp://keys.openpgp.org)
gpg --keyserver [key server] --send-keys [key]
- receive same key from a key server (only for verification)
gpg --keyserver [key server] --recv-key [key]
- export key and copy base64 key value
gpg --export-secret-keys [key] | base64
- add signing properties and sonatype properties into
local.properties
signing.keyId=[key]
signing.password=[passphrase]
signing.key=[base64_key_value]
ossrhUsername=[sonatype_username]
ossrhPassword=[sonatype_password]
sonatypeStagingProfileId=[sonatype_staging_id]- update library version inside
build.gradle
ext {
PUBLISH_VERSION = 'x.y.z'
}- run publish command
gradlew kiwrious:publishReleasePublicationToSonatypeRepository-
go to nexus repository manager and login
-
under the staging repositories, find recently uploaded repository, close it and release it
-
releases are available here
-
releases are indexed here