r/KotlinAndroid

@r_kotlinandroid · сообщество · 1 подписчик

Записи из Reddit: https://www.reddit.com/r/KotlinAndroid/ · импорт O2. Удалить запись — «Пожаловаться» в её меню.

Подписаться в O2
r/KotlinAndroid импорт · Reddit
Android App Error Bluetooth

— u/Key-Advertising854
Android App Error Bluetooth

— u/Key-Advertising854Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
Bluetooth connection error

— u/Key-Advertising854
Bluetooth connection error

— u/Key-Advertising854Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
Help with an app which I want to build

I want to build a expenses app which will automatically read your transaction messages and automatically add it to your budget. I want to use machine learning to classify the expense as shopping,medical and soo on.. I am having the ideas but not the procedure how to do pls help me.

— u/Moddy_Nerd
Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
CompilSDK help!!!

Hello everyone, I'm developing mobile applications and I wanted to know what the purpose of the compilSDKn is and why it's necessary to always target the latest API level.

Are there any security constraints or other considerations? What are the advantages and disadvantages?

— u/PracticalNail5008
Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
Need assistance with a school assignment (ViewModel)

Hi there,

I need some help. I believe the core issue is related to ViewModels. I am unable to find out how to swap between view models, and how to call functions/viewmodels with an argument.

Language: Kotlin
Using Jetpack Compose

App Idea is to get data from API and display this in android app. In link is both app and pdf to assignment. I'm about 80% done.

Data Sharing Link: https://file.io/ixrHSo4wRZxA
(active until 10. March)

— u/Tmwe1
Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
Kotlin Serialization Build Gradle Files Help

I am struggling to get my ContentNegotiation code to work as there is some issue in my gradle files but idk what it is.I get a new error everytime.This is my project level gradle :

buildscript {
dependencies {
classpath("com.google.gms:google-services:4.4.1")
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.2.0"
id("com.google.gms.google-services") version "4.4.1"
kotlin("jvm") version "1.9.22"
kotlin("plugin.serialization") version "1.9.22"
}

and this is my module level gradle :

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.gms.google-services")
}
android {
namespace = "com.example.prosubscriberapp"
compileSdk = 34
defaultConfig {
applicationId = "com.example.prosubscriberapp"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.1"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
val exposedLibraryVersion: String by project
val h2LibraryVersion: String by project
dependencies {
....}

​

this is the error i keep getting The 'java' plugin has been applied, but it is not compatible with the Android plugins.

and i dont know how to fix it without ruining my code.All help is appreciated.I am also new to kotlin btw.

— u/Happydays997
Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
I created a F1 widgets app for android !

Hi everyone ! This my first post on reddit ever haha

I just wanted to share with you the app I've been working on.

I was tired of seeing beautiful widget on iOS with Formulify and Box Box Club, so I decided to create my own version of it, for android. I was heavily inspired by Formulify as you can see haha

I would LOVE to have your feedbacks, and also know if it works on some android devices I couldn't test on !

So if you have any questions or feedback, don't hesitate !
PS: Sorry for my english, it's not my native language

A preview of the widget design :

​

Homescreen with Racify (https://preview.redd.it/jfle62w9nrjc1.png?width=1080&format=png&auto=webp&s=85a3b628eeacfe95f1f26062dd0e3effaee1d2e3)

— u/xILTx
Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
Measuring and analyzing the KotlinJS bundle size

Smaller JavaScript bundle size helps improve a website's loading speed and performance. In this article, we present two different ways of analyzing and measuring KotlinJS bundle size.

https://touchlab.co/measuring-kotlin-js-bundle

— u/KotlinMultiplatform
Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
Struggling to Implement ViewModel

I am an older Android developer getting back into it. I found a tutorial on creating a text based adventure that was in the older-style UI vs Jetpack. After completing the simple tutorial, I thought it would be both useful and a good exercise to recreate it using Jetpack and modern techniques like ViewModel.

I believe I just need some understanding to get over the ignorance hurdle in front of me. I have created the following that I want to use to setup the game scene:

data class GameplayData(

// data fields -> images, text, OnClicks (i still struggle to pass around OnClicks and have them functioning vs directly accessing and setting)

)

class GameplayDataModel : ViewModel() {

private val _gamePlayData = MutableLiveData<List<GameplayData>>()

val gamePlayData: LiveData<List<GameplayData>> = _gamePlayData

init {

_gamePlayData.value = initGamePlayData()

}

}

This is as far as I have been able to get. I believe my next steps are to bring the object into my UI class, set the state, and modify the values to set.

Are there any helpful videos, articles, or tutorials I should look at to better understand? I also want to be able to setup my OnClicks to essentially refresh and update the screen depending on the decision. I appreciate any help and advice.

— u/tkbillington
Оригинал: reddit.com ↗
r/KotlinAndroid импорт · Reddit
Admobs Ads are loading slowly in android

What are the possible reasons for slow rendering of ads ?

— u/Androbhi
Оригинал: reddit.com ↗