• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

kotlin

  1. S

    Transparent background FAB not allowing interaction/blocking interaction

    Hey all I am trying to figure out why I am unable to interact with the background even though my app has a transparent background? The code below was modified from the official Google Android demos here. Here is the code I am using: class FabTransformationActivity : AppCompatActivity() {...
  2. A

    How to select messages from a specific phone number (Kotlin Android)

    val cursor = contentResolver.query(Uri.parse("content://sms/inbox"), null, null, null, null) if (cursor != null) { //cursor.moveToFirst() cursor.moveToPosition(1) var text = cursor.getString(12) Toast.makeText(applicationContext,text,Toast.LENGTH_SHORT).show()...
  3. P

    Is this Android Kotlin socket request blocking even it is inside a Coroutine

    I want to do Android Apps that uses socket queries to microcontrollers and these Android Apps are not very difficult, just short stream Socket requests and respoinses . But I am a new comer, so at the beginnign I am asking : Is this Andfrid Kotlin socket request in a Activity blocking UI thead...
  4. Gioele

    don't know how to access data using retrofit

    I'm writing an application that have to get data from this site: https://api.spacex.land/graphql/. I'm using retrofit for the first time and I don't have idea how I have to set the API service to get, for example, the launchLatest from this site. This is my model: data class LaunchModel(...
  5. J

    Surface View not working on OnePlus Devices

    Currently, I am working on Surface View in android. I am building a custom view that can render an incoming stream of data points on the canvas in a background thread. Hence, Surface View seems to be a good option to handle this specific use case. I have implemented the custom view and it...
  6. A

    Live wallpaper from javascript

    I'm trying to learn how to develop a live wallpaper but i can't understand out how to convert some code parts from javascript to kotlil I can't understand how to convert this.draw = draw this.go = go Javascript package xxxxxx import android.graphics.Canvas import android.graphics.Color...
  7. E

    Display variables from check boxes on textview

    its pretty simple. i want some checkboxes and variable, and every checked checkbox increase the variable by 1. and the variable should display real-time on textView. pls Kotlin. (the image is the check boxes, and if 3 of them is checked, the 'text' textView should show the number 3). Thank you!
  8. C

    Set specific color of ImageView drawable to transparent?

    Hi all, I'm very new to Android development, a total beginner. I've done a bunch of Googling but haven't found an answer to this question: (Maybe this has been asked before, I couldn't find it) Is it possible to specify a specific color in an ImageView drawable and not have that color drawn...
  9. P

    "how to program an app to display in full screen?

    Before Android 11, I've adjusted my app to fullscreen easily My old phone had the camera hole and base buttons outside the screen area, my new phone has a camera hole and the base buttons inside a screen. With few settings, my app was fullscreen in the old phone. Styles.xml <style...
  10. W

    Which database user registration solutions for android and ios app

    I'm building my first quiz app in android studio with Kotlin. I have the .xml file ready for the registration and login page, what are the best options to store login data? I want to make a commercial app. Because its my first app I search for a free (or low cost) solution. I have experience...
  11. DridriLaBastos

    Apps Cannot use Kotlin object pinnig to pass a buffer to a C function

    I am working on an app, and I need to pass a buffer of audio data from kotlin to a C function. The prototype of the C function is : DECL(void, fftBuildAudioData, const jshort* const recordedAudio) (DECL is a macro to declare the good prototype and name function to match JNI specifictions) I...
  12. C

    Apps Bluetooth discovery issue - Jetpack Compose + Kotlin

    Hey all. I am new to android development. I discovered compose and kotlin working with react and figured I would learn and get good at something new. I am trying to figure out how to use bluetooth. I followed the developer guides and have done a bunch of looking around but can't seem to solve...
  13. M

    Help enabling downloads through webview (Kotlin)

    Good day. I'm new to android development and I'm trying to develop a simple webview application, picked a nice template and went through the steps and made good progress, I managed to load my site fully and enable javascript, that works as intended, however I'm not able to make the app download...
  14. A

    Calling kotlin from java shows "Cannot resolve symbol" for classes and methods called

    There are two modules: app (main/application module which contains both Java and Kotlin classes) lib-wrapper (Android-library module which contains Java classes) lib-wrapper is published on the Amazon S3 bucket and used as a library dependency in app module. Proguard rules are applied for the...
  15. Badar Ismail

    Need assistance to make an OCR Android Application in Kotlin:

    Im wanting to make an Android Application in Kotlin using Information Extraction, what it is supposed to do is, it's supposed to extract text from a picture lets say a menu of a restaurant and once scanned, it's supposed to read it out aloud. Can anyone tell me where I can find a video or a...
  16. Androiddeveloper_2021

    Tab switching delays during Webservice execution android TabLayout

    I am using a TabLayout that displays 3 Tabs. When the app is launched First Tab makes Webservice API call,I am not able to move to second tab until first tab First screen finishes Webservice call execution. Is there a way I can stop my First Tab execution when clicked on 2ndTab . My Code for...
  17. A

    App Inventor Simple Hello World for SMS Access without root?

    This is my first time working with Kotlin or Android. I looking to get a very basic Hello World type thing started as a proof of concept of a future app, but need a little basic guidance. I would like to be able to back up my SMS and my MMS messages. I have found that most applications focus on...
  18. R

    runtime error while accessing google api in android emulator

    I am trying to access the googleFit API. It seems pretty straightforward. Get the google sign-in permissions and required authorizations then query for Step count. My code doesn't seem to work. and it logs only "Error!!" that's it. Android gurus, Where am I going wrong?? fun...
  19. Z

    OnDemandData - InstallTimeDelivery

    Hi Guys, at first i have to say that i'm a Beginner at Android and Kotlin. I'm working on a lets say learn App for children. The kids can learn several Parts with Videos. My employer wants that the Videos are all offline. So i decided to programm a InstallTimeDelivery, so after the App got...
  20. K

    Apps Cannot find symbol class class

    I am finishing with the example Android application Real Estates on Mars. It was running well until 4) Task: Display a grid of images with RycyclerView step 9. In MarsPropertyViewHolder, create a bind() method that takes a MarsProperty object as an argument and sets binding.property to that...
  21. R

    in-app purchase: skudetails always empty

    i'm integrating in-app purchase billing library in my app. Does in-app purchases work only on published apps?. My app is in pending publishing state. In coding part skuDetailsResponse always returing empty array. Billing client connection response code is 0. If it works only for published apps...
  22. A

    Correct Architecture for Bottom Nav?

    I want to make a music app, very simple, using ExoPlayer. It will have a bottom nav with "songs" as the landing page, a recycler view of all songs in the library, with a player at the bottom of the view. Other areas of the app will be "albums", "artists" and "playlists". These again will be...
  23. Android News

    Google introduces easier Android development with KotlinX

    Google has introduced Android KTX, a new extrension to Kotlin that'll make it easier to wrote cleaner code. It's a set of extensions that makes it more natural to implement common funct ions in Android
  24. Android News

    Kotlin could overtake Java on Android next year

    Researchers have found that around 20% of apps that were built with Java are being rebuilt with Kotlin after Google endorsed the language for Android development.
  25. Android News

    Android Studio 3.0 arrives in stable channel

    Android Studio 3.0 has finally reached stable. This version of the Android development studio adds support for Kotlin, Google's new preferred programming language for Android apps.