How to more accurately estimate read time in your Android Kotlin Project

dependencies {
implementation 'com.github.wise4rmgod:ReadTime:0.1.0'
}
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
countWords("String")= it takes a string parametalcustome_minread("String", "message") = you get to add a cutome messgaemiread("String") = just add the words
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

val ty = "f your audience reads slower or faster than 200 words per minute — \n" +
" perhaps your blog is in English, which isn’t your audience’s first language, or perhaps your material is extremely\n" +
" basic and easy to skim — then you’ll want to use calculator instead. First, you’ll have to divide your total word \n" +
" count by the average words read per minute of your audience. Let’s say your 938-word article has an audience that \n" +
" reads 150 words per minute. That gives you 6.253. Enter 6.253 into the Decimal-to-Time Calculator, choose “Minutes” \n" +
" from the drop-down menu and press “Calculate.”\n" +
" Immediately, you’ll get a minute and seconds estimate. In this case, it’s 6 minutes and 15 seconds."

wordct.text = Minread.countWords(ty).toString()

minread.text = Minread.minread(ty)

//custom message in the min read
minread.text = Minread.custome_minread(ty,"min read")

}
}

--

--

--

A software engineer with considerable experience in mobile development, native Android, and IOS development(Xcode), flutter dev, technical writing and community

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Kotlin Standard Delegates — Lazy, Observable and Vetoable

How to Integrate Firebase Crashlytics to Android project in Android studio

Android Development Cheatsheet

Getting Started with Bugfender

Strategy Design Pattern | Android real-life example

Flutter Stream Builder

Why Use Material Design? Weighing the Pros and Cons

Integrate Espresso Idling Resources in your app to build flexible UI tests

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nwokocha Wisdom Maduabuchi

Nwokocha Wisdom Maduabuchi

A software engineer with considerable experience in mobile development, native Android, and IOS development(Xcode), flutter dev, technical writing and community

More from Medium

Implementing Wallet Payments in Android Apps

Exploring Jetpack WindowManager for Foldable Devices

Barista UI Testing(on top of Espresso)

Kotlin for Android Development(Part-2)